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.Tue, 28 Jul 2020 12:14:55 +0200rotating polytope in 4d?https://ask.sagemath.org/question/52652/rotating-polytope-in-4d/ So back in the day, when one had to install a viewer separately to see 3D stuff in Sage... when one plotted a 4-polytope in Sage, there were popup menu options for rotating the image in other than the visible 3 dimensions.
How does this work now? (Or how is it supposed to work?) None of my students are able to find controls of any kind; we have people on Macs, PCs, Linux. Everyone is in Sage 9.0 or 9.1.Fri, 24 Jul 2020 16:28:21 +0200https://ask.sagemath.org/question/52652/rotating-polytope-in-4d/Answer by jipilab for <p>So back in the day, when one had to install a viewer separately to see 3D stuff in Sage... when one plotted a 4-polytope in Sage, there were popup menu options for rotating the image in other than the visible 3 dimensions. </p>
<p>How does this work now? (Or how is it supposed to work?) None of my students are able to find controls of any kind; we have people on Macs, PCs, Linux. Everyone is in Sage 9.0 or 9.1.</p>
https://ask.sagemath.org/question/52652/rotating-polytope-in-4d/?answer=52719#post-id-52719The current default viewer in Sage is now threejs.
To visualize a 4-dimensional polytope, you can do:
sage: hc = polytopes.hypercube(4)
sage: hc.plot()
Launched html viewer for Graphics3d Object
This will open a html page in the default internet browser (this might be a problem, as sometimes if the browser was updated it might not open a new tab). In there, there will be a threejs applet which you can play with with mouse-clicks.
You are probably refering to the pop up menu from the jmol viewer, which is still accessible (though likely is less maintained now as it is not the default viewer anymore):
sage: hc.plot(viewer='jmol')
Launched jmol viewer for Graphics3d Object
There, you may right-click and select "console" where you can then type commands to rotate and change the view.
As far as I know, there was no possibility to change the projection view (from 4d to 3d) once the picture of the Schlegel diagram has been produced.
It is possible to change the projection view, for this, you may proceed to play around as follows:
sage: new_pic = hc.schlegel_projection([1,1,1,2],1.5)
sage: new_pic.plot()
Launched html viewer for Graphics3d ObjectTue, 28 Jul 2020 12:14:55 +0200https://ask.sagemath.org/question/52652/rotating-polytope-in-4d/?answer=52719#post-id-52719