ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 02 Jan 2013 16:03:02 +0100Saving 3d pictures as anaglyphshttps://ask.sagemath.org/question/9676/saving-3d-pictures-as-anaglyphs/I found [this page](http://arachnoid.com/sage/learning_sage.html) which mentioned (near the bottom) that the Dodecahedral Graph can be rendered in 3D after which you could look at the anaglyph (3D red, cyan image). This picture ![image description](/upfiles/13570882666608889.jpeg)
is shown (which appears to be Sage output) but I am unable to reproduce it. I tried
H=graphs.DodecahedralGraph().plot3d()
H.show(stereo='redcyan')
H.save("dodec.png")
but the resulting png image isn't in 3D. I tried adding **stereo='redcyan'**, **stereo =True**, and other variations to the line saving the png but without success. How do I save anaglyphs like the image above?Tue, 01 Jan 2013 20:23:32 +0100https://ask.sagemath.org/question/9676/saving-3d-pictures-as-anaglyphs/Answer by fidbc for <p>I found <a href="http://arachnoid.com/sage/learning_sage.html">this page</a> which mentioned (near the bottom) that the Dodecahedral Graph can be rendered in 3D after which you could look at the anaglyph (3D red, cyan image). This picture <img alt="image description" src="/upfiles/13570882666608889.jpeg"/> </p>
<p>is shown (which appears to be Sage output) but I am unable to reproduce it. I tried</p>
<pre><code>H=graphs.DodecahedralGraph().plot3d()
H.show(stereo='redcyan')
H.save("dodec.png")
</code></pre>
<p>but the resulting png image isn't in 3D. I tried adding <strong>stereo='redcyan'</strong>, <strong>stereo =True</strong>, and other variations to the line saving the png but without success. How do I save anaglyphs like the image above?</p>
https://ask.sagemath.org/question/9676/saving-3d-pictures-as-anaglyphs/?answer=14411#post-id-14411Try getting the plot in the Jmol viewer without assigning it to a variable, so just
graphs.DodecahedralGraph().plot3d()
Once you have the Jmol viewer right-click the graph and choose 'Style -> Stereographic -> Red+Cyan'.
If you are not using the notebook (ie. running Jmol as an application), you can right click the graph again and choose 'File -> Export PNG Image'.
If you are using the notebook (ie. running Jmol as an applet), you can click the "Toggle Advanced Controls" buton and then the "Get Static Image to Save (Sleep)" button.
This should get you some version of the image you want.
Edit: Doing this in the notebook is slightly different, updated answer.Tue, 01 Jan 2013 23:38:11 +0100https://ask.sagemath.org/question/9676/saving-3d-pictures-as-anaglyphs/?answer=14411#post-id-14411Comment by dazedANDconfused for <p>Try getting the plot in the Jmol viewer without assigning it to a variable, so just</p>
<pre><code>graphs.DodecahedralGraph().plot3d()
</code></pre>
<p>Once you have the Jmol viewer right-click the graph and choose 'Style -> Stereographic -> Red+Cyan'. </p>
<p>If you are not using the notebook (ie. running Jmol as an application), you can right click the graph again and choose 'File -> Export PNG Image'. </p>
<p>If you are using the notebook (ie. running Jmol as an applet), you can click the "Toggle Advanced Controls" buton and then the "Get Static Image to Save (Sleep)" button.</p>
<p>This should get you some version of the image you want.</p>
<p>Edit: Doing this in the notebook is slightly different, updated answer.</p>
https://ask.sagemath.org/question/9676/saving-3d-pictures-as-anaglyphs/?comment=18453#post-id-18453Thanks for your help. I struggled with the instructions, though, so for those with the same problem let me mention: I was working in the Sage Cell Server and still am unable to get the instructions to work. So I switched to the notebook, chose 'Style->Stereographic->Red+Cyan' and couldn't find any "Toggle Advanced Controls" button. There is, however, a "Get Image" button (I'm using Sage 4.8) below the image.
Left clicking on that opened up a static version in my Chromium browser. Right clicking on the static image let me save it as a .jpg file. If you could explain more how to get a static picture from Sage Cell Server (I like to run the latest version) and/or where to find "Toggle Advanced Controls" button, that would be helpful.Wed, 02 Jan 2013 11:43:25 +0100https://ask.sagemath.org/question/9676/saving-3d-pictures-as-anaglyphs/?comment=18453#post-id-18453Comment by fidbc for <p>Try getting the plot in the Jmol viewer without assigning it to a variable, so just</p>
<pre><code>graphs.DodecahedralGraph().plot3d()
</code></pre>
<p>Once you have the Jmol viewer right-click the graph and choose 'Style -> Stereographic -> Red+Cyan'. </p>
<p>If you are not using the notebook (ie. running Jmol as an application), you can right click the graph again and choose 'File -> Export PNG Image'. </p>
<p>If you are using the notebook (ie. running Jmol as an applet), you can click the "Toggle Advanced Controls" buton and then the "Get Static Image to Save (Sleep)" button.</p>
<p>This should get you some version of the image you want.</p>
<p>Edit: Doing this in the notebook is slightly different, updated answer.</p>
https://ask.sagemath.org/question/9676/saving-3d-pictures-as-anaglyphs/?comment=18451#post-id-18451If you are using the sage cell server, then getting the appropriate style can be achieved with 'Advanced -> Style -> Stereographic -> Red+Cyan'.
I'm not really sure how to get the png file directly from the jmol viewer in this case (tried using the console but didn't make it work). But there is always the alternative of taking a snapshot of the screen (the way to get it will depend on the OS you are running :)Wed, 02 Jan 2013 16:03:02 +0100https://ask.sagemath.org/question/9676/saving-3d-pictures-as-anaglyphs/?comment=18451#post-id-18451