On 03/02/2010 09:21 AM, [email protected] wrote:
Dear sage-support
If I plot 3d graph using
sage: plot3d(sqrt(sin(x)*sin (y)), (x,0,12),(y,0,12) )
the output looks fine. The output of
sage: plot3d(sqrt(sin(x)*sin (y)), (x,0,2*pi),(y,0,2*pi) )
should be different but it is completely wrong (no graph and bounds
for z from 0.00000 to 0.00000156).
The plot for
sage: plot3d(sqrt(sin(x)*sin (y)), (x,0,(2*pi+pi/2)),(y,0,(2*pi+pi/
2)) )
looks fine again. Is it a bug in code for plot3d when determing z-
range? Is it possible to force my z-range to show command?
The problem is that the point comparison function (that finds the
minimum and maximum points of the function) does not account for the
fact that the NaN values generated by the function are both not less and
not greater than any finite number. I've posted a patch to
http://trac.sagemath.org/sage_trac/ticket/8424 which corrects this
problem for two of the three places that points are compared in the 3d
plotting code. The third place is plot/plot3d/transform.pyx, and I
don't have the time now to make sure my fix is right for that file or
write the necessary doctests in that file to get this patch accepted.
The patch should pass doctests, correct the problem you noticed, and be
ready for review.
Robert Bradshaw: you'd be the most natural person to review this patch,
and it's really small. Performance-wise, I see a slight performance
increase after applying the patch in calculating the bounding box for
the function above.
David Kirkby: I use the INFINITY #def'd constant and a c99 function
isfinite from GCC's math.h. Will these pose a problem on Solaris?
Thanks,
Jason
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org