Ask Your Question

Revision history [back]

Reading the source for show for 3d plots reveals that you can do the following:

sage: f(x,y) = sin(x*y)
sage: P = plot3d(f, (x,-2,2), (y,-2,2))
sage: opts = P._process_viewing_options({})
sage: T = P._prepare_for_tachyon(opts['frame'],opts['axes'], opts['frame_aspect_ratio'],opts['aspect_ratio'],opts['zoom'])
sage: S = T.tachyon()
sage: type(S)
<type 'str'>

Thus, as you can see, a "Tachyon object" is never created in the course of rendering 3D plots. You just get a string that tells the Tachyon raytracer how to draw the scene. You can then draw the plot with:

sage: tachyon_rt(S)
sage: !open sage.png

So I think this completely answers your first question.

I don't think Tachyon.plot works is worth messing with. It should just be deleted. It used to be useful (somewhat) relatively sophisticated code by Josh Kantor and Tom Boothby, but is superseded by what is in the general plot3d code now.