Ask Your Question

Add a 3d graphics object to a tachyon scene

asked 2016-05-05 17:27:00 +0200

slelievre gravatar image

I'm trying to understand how to add 3d graphics objects to a tachyon scene.

Suppose I define a tachyon scene

sage: s = Tachyon(xres=512,yres=512, camera_center=(3,0.3,0))

and I define a torus and a 3d plot

sage: from sage.plot.plot3d.shapes import Torus
sage: t = Torus(0.5, 0.2)
sage: p = plot3d(lambda x, y: x^2 + y^2, (-2,2), (-2,2))

How can I add t and p to s?

I know I can do s.str() and t.tachyon() and p.tachyon() to get strings depicting s, t and p as tachyon scenes, so I could fiddle with these strings, but is there a better way?

For instance, if I have a string depicting a tachyon scene, can I turn it into a Sage tachyon scene, extract its objects, add them to another scene's objects?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-09-19 17:53:16 +0200

niles gravatar image

This has been requested from time to time in the past. Functionality to do this automatically is definitely something we'd like to add to sage. There is an open ticket, and there you can see a few different approaches that people have given in the past. Hopefully one of them will help you with your task!

Unfortunately, there isn't any active work on choosing a method and including it into sage. Any effort would be welcome :)

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2016-05-05 17:27:00 +0200

Seen: 382 times

Last updated: Sep 19 '16