2015
07.08

## Animating figures

So, generating an animated figure is surprisingly easy from a pdf file – every page turn into a frame, and one can easily set the delay between frames. One can easily generate such pdfs from ipe figures – especially when one draws a complicated figure with subfigures demonstrating an algorithm. The resulting animation demonstrates the algorithm much better than the static figure can. For example (and no, you are going to have no clue whats going on, for this you would have to read the paper, which I hope to post in a few days), see here.

So, the following works under linux using ImageMagic:
 convert -density 300 \ -delay 300 "file.pdf[0-3]" \ -delay 100 "file.pdf[4-21]" \ -delay 500 "file.pdf[22]" \ test.gif 
The delay parameter sets the time delay between frames (in 0.01 second units), and the “[0-3]” indicates what range of pages would be used. In the above, I put different delays between frames. The density parameter decides the resulting size of the output – larger number, results in a bigger image.

I hope this medium would be used more frequently – it definitely shows a potential to be useful.