This is a (quite ad-hoc) solution to include animations (even responsive/interactive ones) programmed in C (or Objective-C, OpenGL/GLSL etc.) into a LaTeX generated PDF.
The example below is an animated talk on the Birch and Swinnerton-Dyer conjecture that I gave 2009 in Berlin and 2018 in Freiburg. All animations included (so far) in the beamermath app have been designed specifically for this example. However, as said, it is easy to expand the app and include your own animations.
The example contains (the boldface numbers refer to the slides as displayed in the titlebar of the app):
All 3D-images and animations can be interactively rotated, shifted and zoomed during runtime.
The following assigment of keys can (optionally) be used to move the 3D-camera position and direction:
j,k | y-rotation |
i,m | x-rotation |
v,b | z-rotation |
a,s | x-translation |
w,y | y-translation |
q,e | z-translation |
1,2 | zoom in/out |
To see the example:
LaTeX-files (including 3D-animations for the example and the beamermath package): | tex.zip | 97.6 MB |
beamermath app (Mac only): | beamermath.dmg | 59 KB |
beamermath source code and Xcode-project: | xcodeproject.zip | 62 KB |
To see/reuse the animations of the example you do not need to download and compile the Xcode-project.
Use the "draft" package option to display bounding boxes. This should be turned off for the final version displayed with the app.
\mbvbox{NAME}{ ... } | Creates a vertical box with name NAME and content (...). |
\mbrbox{NAME}{X}{Y}{W}{H} | Creates an empty box with name NAME at X,Y with width W and height H (TeX dimensions). With the "draft" option of the package this has a small black border. |
\mbpage | Creates a new virtual page for the app to display. Each \begin{frame} \end{frame} of the "beamer"-package should contain at least one \mbpage. |
\mbcmd{CMD}{PARAMETERS} | Inserts a Command for the app to execute on this page.
Examples: \mbcmd{HIDE}{NAME1 NAME2 NAME3} hides the boxes with names NAME1, NAME2 and NAME3. \mbcmd{GOAL}{0.0 0.25 0.00 -0.94 -20.00 0.00 0.00 0.00 0.57 0.00 1.00} moves the OpenGL-viewport within the time interval 0s-0.25s to the specified location. \mbcmd{GLVIDEO}{0.0 5.0 QQ animations/projective.vid 0 49} displays frames 0-49 from the specified 3D-video in Box QQ within the time interval 0s-5s. |
Compile the LaTeX-code two times to get the PDF meta-data updated!
Created on 9.8.2018 by PD Dr. Fritz Hörmann Mathematisches Institut - Raum 433 Albert-Ludwigs-Universität Freiburg Ernst-Zermelo-Strasse 1 D-79104 Freiburg eMail: fritz.hoermann@math.uni-freiburg.de Tel: +49 176 99520388 Licensed under CC BY-SA 4.0.