Ask Your Question
1

rotating polytope in 4d?

asked 2020-07-24 16:28:21 +0200

smbelcas gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-28 12:14:55 +0200

jipilab gravatar image

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
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-07-24 16:28:21 +0200

Seen: 228 times

Last updated: Jul 28 '20