Re: [racket] Plot woes

2012-06-01 Thread Neil Toronto
On 05/30/2012 11:12 AM, Jens Axel Søgaard wrote: Hi All, Attached is my version of a 2d-plotter that handles singularities. Give it a spin with your favorite ill-behaved functions and report back with ones badly handled. For approaches like this, I think the definition of "well-behaved" is "l

Re: [racket] Plot woes

2012-05-30 Thread Jens Axel Søgaard
Hi All, Attached is my version of a 2d-plotter that handles singularities. Give it a spin with your favorite ill-behaved functions and report back with ones badly handled. /Jens Axel adaptive-plotting.rkt Description: Binary data Racket Users list: http://lists.racket-l

Re: [racket] Plot woes

2012-05-29 Thread Neil Toronto
On 05/29/2012 12:45 AM, Eli Barzilay wrote: On Thursday, Neil Toronto wrote: I just pushed a fix for this. The following now works as you'd expect: #lang racket (require plot) (plot (list (function (compose / exact->inexact) -1 0) (function (compose / exact->inexact) 0 1))) (p

Re: [racket] Plot woes

2012-05-28 Thread Eli Barzilay
On Thursday, Neil Toronto wrote: > > I just pushed a fix for this. The following now works as you'd expect: > > #lang racket > > (require plot) > > (plot (list (function (compose / exact->inexact) -1 0) > (function (compose / exact->inexact) 0 1))) > > (plot (list (function / -1 -

Re: [racket] Plot woes

2012-05-24 Thread Neil Toronto
On 05/22/2012 09:05 PM, Neil Toronto wrote: On 05/22/2012 02:41 AM, Jens Axel Søgaard wrote: Since the contract for plot requires I must use numbers, I attempted to split the domain in two from -1 to -epsilon and from +epsilon to 1. That trick didn't work (see attached image). Am I missing som

Re: [racket] Plot woes

2012-05-22 Thread Eli Barzilay
Three hours ago, Matthias Felleisen wrote: > > On May 22, 2012, at 8:05 AM, Neil Toronto wrote: > > > I've thought of such things before. Unfortunately, plot doesn't > > know where any singularities are, so it can't specifically sample > > the function at those points. I could probably allow the

Re: [racket] Plot woes

2012-05-22 Thread Jens Axel Søgaard
2012/5/22 Matthias Felleisen : > On May 22, 2012, at 8:05 AM, Neil Toronto wrote: > >> I've thought of such things before. Unfortunately, plot doesn't know where >> any > singularities are, so it can't specifically sample the function at those > points. I could > probably allow the user to tell p

Re: [racket] Plot woes

2012-05-22 Thread Matthias Felleisen
On May 22, 2012, at 8:05 AM, Neil Toronto wrote: > I've thought of such things before. Unfortunately, plot doesn't know where > any singularities are, so it can't specifically sample the function at those > points. I could probably allow the user to tell plot where they are, but I > can't thin

Re: [racket] Plot woes

2012-05-22 Thread Neil Toronto
I've replied to the list because this might be useful for other people. On 05/22/2012 02:41 AM, Jens Axel Søgaard wrote: Hi Neil, I am attempting to draw 1/x in using plot. Ideally I'd like to be able to write: (lambda (x) (if (zero? x) #f (/ x)) in order to plot a function with singularit