Ask Your Question
0

3d plots without Java

asked 2011-05-17 18:53:54 +0100

v_2e gravatar image

updated 2011-05-22 14:57:55 +0100

Kelvin Li gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
6

answered 2011-05-17 19:18:51 +0100

benjaminfjones gravatar image

updated 2011-05-18 10:01:16 +0100

kcrisman gravatar image

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

edit flag offensive delete link more

Comments

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.

cswiercz gravatar imagecswiercz ( 2011-05-17 20:27:01 +0100 )edit

Nice! I didn't realize that was available.

benjaminfjones gravatar imagebenjaminfjones ( 2011-05-17 20:30:21 +0100 )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.

kcrisman gravatar imagekcrisman ( 2011-05-17 22:54:16 +0100 )edit

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

v_2e gravatar imagev_2e ( 2011-05-18 02:40:12 +0100 )edit

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

deebs67 gravatar imagedeebs67 ( 2011-05-18 08:01:46 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-05-17 18:53:54 +0100

Seen: 1,192 times

Last updated: May 18 '11