Remove shadows from axes in plot3d with viewer tachyon
I would like to remove the shadows from the axes that are projected onto a plot3d image I created. Thank you in advance.
I would like to remove the shadows from the axes that are projected onto a plot3d image I created. Thank you in advance.
You can do :
P1=<whatever you want plotted>
P1.show(viewer="tachyon", frame=False)
and you get a picture without frame shadows (and without frame, obviously...)
The documentation of the use of Tachyon parameters with Sage 3D graphics objects is sparse (to say the least...). It might be possible to get a frame without frame shadows, but I do not (yet) know how to get it.
If you're serious about getting a raytraced image you probably want to look into P1.tachyon()
to get the data that can be fed to the tachyon raytracer. You can edit that file to your liking. If you don't want shadows on the axes you should probably go with completely ambient lighting, and no directional light source. Or you could place the light source in such a way that the shadows don't bother you. Alternatively, export to blender somehow and use that raytracer.
Nils, your answer is much better than mine. You should develop it in a full answer...
If you are interested in producing a high-quality raytraced image from sage output, you should probably use special configuration of the raytracer directly. There is definitely more configuration we should allow in sage directly (choice of camera, some basic lighting options), but for really good results there will be no substitute.
Sage just writes a scene file for the tachyon
raytracer. You can take that file and edit it. Here's how you can get such a file:
sage: var('x,y')
(x, y)
sage: G=plot3d(x^2+y^2,(x,-1,1),(y,-1,1))
sage: with open("T.dat","w") as F: F.write(G.tachyon())
Your next problem would be to figure out how to call the tachyon raytracer with such a file. SOmething like this would probably work:
sage: %system tachyon T.dat -format PNG -o T.png
Now you should have an image file T.png
that displays your scene.
Your next stop is to read the documentation of tachyon
http://jedi.ks.uiuc.edu/~johns/raytra... and edit the scene file T.dat
to your liking.
Alternatively, you could look at different export methods, such as G.obj()
and G.x3d()
and see if mainstream raytracers such as blender can read one of them.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2017-12-06 17:08:42 +0100
Seen: 455 times
Last updated: Dec 27 '17
Welcome to Ask Sage! Please provide a way to reproduce the problem as a starting point to try and help.
Note: To display inline code, use backticks. To display blocks of code or error messages, separate them by a blank line from the rest of the text, and indent them with 4 spaces, or select code lines and click the "code" button (the icon with '101 010').
For instance, typing
will produce: