#10215: Sage's plot3d() is very poor compared to Mathematica's Plot3D[]
---------------------------+------------------------------------------------
Reporter: drkirkby | Owner: jason, was
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.6.1
Component: graphics | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Description changed by drkirkby:
Old description:
> Following a request to test the following 3 lines of code on #8433
>
> {{{
> y=var('y')
> B=plot3d(sqrt(sin(x)*sin(y)),(x,-2*pi,2*pi),(y,-2*pi,2*pi),viewer='tachyon')
> B.show()
> }}}
>
> I did this on Sage 4.5.1 running on Solaris 10 and found no problems of
> excessive CPU time as reported at #8433. However, the quality of the
> output leaves a lot to be desired, and appears to show discontinuities
> which are not in the function.
>
> Attached are two images showing the output from Sage using
>
> {{{
> y=var('y')
> B=plot3d(sqrt(sin(x)*sin(y)),(x,-2*pi,2*pi),(y,-2*pi,2*pi),viewer='tachyon')
> B.show()
> }}}
>
> [[Image(sage-plot3d-sinx-siny.png)]]
>
> and Mathematica 7.0.1 using the following command
>
> {{{
> Plot3D[Sqrt[Sin[x] Sin[y]],{x,-2 Pi, 2 Pi},{y, - 2 Pi, 2 Pi}]
> }}}
> [[Image(Plot3D-in-Mathematica-of-sqrt-sin-x-sin-y.png)]]
>
> Whilst Mathematica's output is obviously more asetically pleasing, with
> the false colour, the main problem with the Sage output is that it shows
> discontinuities which simply should not exist in the function being
> plotted. (Obviously, for some values of x and y, the square root of a
> negative number is taken, so the plots do not show this. However, the
> transition to this point should be smooth, like in the Mathematica
>
> It would be good if we could improve this. Jason Grout had some idea what
> the problem probably is.
>
> http://groups.google.com/group/sage-
> devel/browse_thread/thread/7476ecc5d4e83caf?hl=en
>
> saying
>
> ''I think the problem is that in Sage, we do not try to break up plotting
> triangles to find out the actual boundaries of a domain. Instead, we just
> try to plot the triangle that goes across the domain boundary, find that
> one corner of the triangle is off the domain, and so we don't plot the
> triangle. ''
New description:
Following a request to test the following 3 lines of code on #8433
{{{
y=var('y')
B=plot3d(sqrt(sin(x)*sin(y)),(x,-2*pi,2*pi),(y,-2*pi,2*pi),viewer='tachyon')
B.show()
}}}
I did this on Sage 4.5.1 running on Solaris 10 and found no problems of
excessive CPU time as reported at #8433. However, the quality of the
output leaves a lot to be desired, and appears to show discontinuities
which are not in the function.
Attached are two images showing the output from Sage using
{{{
y=var('y')
B=plot3d(sqrt(sin(x)*sin(y)),(x,-2*pi,2*pi),(y,-2*pi,2*pi),viewer='tachyon')
B.show()
}}}
[[Image(sage-plot3d-sinx-siny.png)]]
and Mathematica 7.0.1 using the following command
{{{
Plot3D[Sqrt[Sin[x] Sin[y]],{x,-2 Pi, 2 Pi},{y, - 2 Pi, 2 Pi}]
}}}
[[Image(Plot3D-in-Mathematica-of-sqrt-sin-x-sin-y.png)]]
Whilst Mathematica's output is obviously more asetically pleasing, with
the false colour, the main problem with the Sage output is that it shows
discontinuities which simply should not exist in the function being
plotted. (Obviously, for some values of x and y, the square root of a
negative number is taken, so the plots do not show this. However, the
transition to this point should be smooth, like in the Mathematica
It would be good if we could improve this. Jason Grout had some idea what
the problem probably is.
http://groups.google.com/group/sage-
devel/browse_thread/thread/7476ecc5d4e83caf?hl=en
saying
''I think the problem is that in Sage, we do not try to break up plotting
triangles to find out the actual boundaries of a domain. Instead, we just
try to plot the triangle that goes across the domain boundary, find that
one corner of the triangle is off the domain, and so we don't plot the
triangle. ''
'''Related tickets''' #8433
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10215#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
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-trac?hl=en.