Animation
< Visuals | Using Graphics | JavaScript>
< Presentation effects | RawSteps | SlideWithSteps >
Contents
Introduction
If you want to give some dynamics to your documents, there are essentially two possibilities to do so:
- making multiple pages and (quickly) browse through them
- using JavaScript
- (probably one day SVG will enable that too)
The first alternative can be hardcoded, achieved with either some trickery (\dorecurse may sometimes help you) or with support of mudules such as RawSteps.
This page will mostly deal with JavaScript animations.
An example
Suppose you have a presentation and you want the content of a slide to be gradually shown on the screen like in the next example:
Slide 1
If a chicken and a half lays an egg and a half in a day and a half, how many eggs can one chicken lay in one day?
Slide 2
If a chicken and a half lays an egg and a half in a day and a half, how many eggs can one chicken lay in one day? - What a stupid question! ONE, of course.
Slide 3
If a chicken and a half lays an egg and a half in a day and a half, how many eggs can one chicken lay in one day? - What a stupid question! ONE, of course. - Wrong! I'll give you one more try: how many eggs can one chicken lay in a day and a half?
Slide 4
If a chicken and a half lays an egg and a half in a day and a half, how many eggs can one chicken lay in one day? - What a stupid question! ONE, of course. - Wrong! I'll give you one more try: how many eggs can one chicken lay in a day and a half? - Wait a minute ... one chicken can lay 2/3 eggs in one day, doesn't it?
The difference in how the two mentioned method would deal with it:
- In the first case your document would consist of 4 pages with the corresponding content on each page.
- In the second case you would only have one page and some JavaScript code behind the scenes taking care of the content appearing gradually on your page as you click on some button.
Comparison
It all depends on your needs which of the two mentioned possibilities would suit you most. Here are some advantages and disadvanteges of both methods listed.
PROS | CONS | |
---|---|---|
Multiple pages |
|
|
JavaScript |
|
|
How to make movies?
Even if you were leaping for joy once you heard about the animations, I have to disappoint you right away: no matter how hard you try, it's not very likely that you'll ever achive much more than one, maybe some frames per second. So won't really be able to watch movies this way.
However, there's another possibility to use your nice metapost figures to make animations, pdf2swf. See http://melusine.eu.org/syracuse/metapost/animations/ and http://www.quiss.org/swftools/examples.html for examples.
Preparing the figures with Metapost/Metafun
JavaScript Animations
Animations in plain TeX
Animations in a pdfTeX-generated PDF
Examples
Animating Text
TODO: presentations with pre-61
Making animations with external tools
Samples
- Gif Animation
- Flash Animations made with swftools
Documentation
- JavaScript (as well as PDF) reference at [Adobe]
TODO: Here are a lot of empty sections, and a bit more order won't hurt (See: To-Do List) |