Plotting singular functions



Raymond Toy ?????:
>>>>>>"James" == James Amundson <amundson@users.sourceforge.net> writes:
> 
> 
>     James> I'm worried, however, that this line of thought leads to a routine that
>     James> produces potentially misleading results. What does a plot of
>     James> 	sqrt(sin(x^2+y^2)),[x,-4,4],[y,-4,4]
>     James> look like using this algorithm? 
> 
> Good question.  But coerce-float-fun takes the realpart, so we get the
> realpart of the sqrt.  (Well, the code says that.  I didn't try it.)
> 
> Ray
> 

Realpart seems to be working, but plot2d(asin(x),[x,-2,2]) looks 
strange. Left part should be -%PI/2. Why it positive?

In general, what if the function is only piece-wise well defined?
Not sqrt(of something negative) -> 0, but due to some
other reason?  Maybe Maxima is just unable to compute numerical
value, like in plot3d(gamma(x+%i*y),[x,-3,3],[y,-1,1]).
And this problem relates both to 2D and 3D plotting.
I've checked Maple and Maxima - it seems that they just
don't plot points where numerical value can't be computed.

BTW, now I understand that my idea to abort plotting after
10 or 20 unsuccessful samples is not so good.  These samples
may occasionally fit into not-wel-defined region.
But in any case at least some sanity chek is required.
We should not produce plot is none of the sumples is
good.

-- 
      Vadim V. Zhytnikov

       <vvzhy@mail.ru>
      <vvzhy@netorn.ru>