# 3d plots without Java

Hello! Is it possible to get a "static" plot of 3D-data? For example, if I state the fixed angles of view and want to get simply a PNG file. Maybe something like the command

gnuplot -e 'set terminal png; set view 80,30; splot "output.txt"'


gives.

If it isn't implemented in Sage right now, is it planned? Thanks.

edit retag close merge delete

Sort by ยป oldest newest most voted

There is a ray-tracer built into Sage called Tachyon. In the example from your previous question, try:

sage: L = [ (1, 1, 1), (1, 5, 7), (8.8, 0, 3),  (7.5, 1.91, 11.8), (0, 0, 0) ]
sage: point3d(L, viewer='tachyon')


or..

sage: x,y=var('x,y')
sage: plot3d(x^2-y^2, (x,-2,2), (y,-2,2), viewer='tachyon')


Here is the section of the Sage manual: Tachyon

more

Also, on a somewhat related note, if you want a "dynamic"/interactive plot without Java you can use " viewer='canvas3d' " for an HTML5-based 3d plot.

( 2011-05-17 20:27:01 +0200 )edit

Nice! I didn't realize that was available.

( 2011-05-17 20:30:21 +0200 )edit

Though one should point out that this doesn't work so well with the particular example given in L. See http://www.sagemath.org/doc/reference/sage/plot/plot3d/base.html for an example where it is really nice.

( 2011-05-17 22:54:16 +0200 )edit

Thanks a lot! I heard something about Tachyon, but didn't think it was as easy! :) I'll play with it.

( 2011-05-18 02:40:12 +0200 )edit

It seems to need a var('x,y') before the plot3d() example in the answer above (it did for me anyhow)

( 2011-05-18 08:01:46 +0200 )edit