This tutorial is probably also available as a Jupyter notebook in the demo
folder in the polymake source and on github.
Different versions of this tutorial: latest release, release 4.13, release 4.12, release 4.11, release 4.10, release 4.9, release 4.8, release 4.7, release 4.6, release 4.5, release 4.4, release 4.3, release 4.2, release 4.1, release 4.0, release 3.6, nightly master
Embed interactive visualizations in PDF files
With polymake
and jReality you can even embed your visualizations as interactive applets into pdf files (from LaTeX).
- Visualize your polytope, or any other object, with jReality. You might need to call
jreality($x->VISUAL);
or something similar. - Export the visualized object from jReality:
File → Export → U3D
- In your tex-file you need to add the
movie15
package and then use the\includemovie
command to include the applet:
\usepackage[3D]{movie15} ... \includemovie[ mimetype=model/u3d, 3Djscript=Encompass.js, autoplay ] { \textwidth } { 0.7\textwidth } {object.u3d}
- Compile the LaTeX source with pdflatex.
- View the pdf file with a reasonably recent version of Adobe Reader.
Options for includemovie
- (More or less) optional arguments:
mimetype=model/u3d
Mandatory to tell the viewer what kind of object this is.autoplay
Can be set to automatically load the applet when opening the page. Otherwise you will see a white area and a small text Click to activate.3Dscript
JavaScript code to manipulate the scene (camera, lights, etc.).
- Two arguments for the dimensions of the applet.
- Filename.
Further information
- An example PDF-file to test your PDF viewer. This also contains a non-polymake visualization created directly with jReality. (Try rotating the objects!)
- A short tutorial in the jReality wiki, where you also find an example JavaScript file.
- Documentation of the
movie15
package.