Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The 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 Object