user_guide:tutorials:pdf

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.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

This is an old revision of the document!


Embed interactive visualizations in PDF files

With polymake and jReality you can even embed your visualizations as interactive applets into pdf files (from LaTeX).

  1. Visualize your polytope, or any other object, with jReality. You might need to call jreality($x->VISUAL); or something similar.
  2. Export the visualized object from jReality: File → Export → U3D
  3. 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}
  1. Compile the LaTeX source with pdflatex.
  2. View the pdf file with a reasonably recent version of Adobe Reader.
  • (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.
  • user_guide/tutorials/pdf.1548500532.txt.gz
  • Last modified: 2019/01/26 11:02
  • by oroehrig