[metapost] Animated graphics with Metapost?

luigi scarso luigi.scarso at gmail.com
Sat Jun 11 09:30:59 CEST 2011


On Sat, Jun 11, 2011 at 8:18 AM, Dirk Laurie <dpl at sun.ac.za> wrote:
> I'd like to make an incremental version of a drawing, i.e.
> when displayed it starts of with just a line and gradually
> adds more lines, points, color fill-ins etc, which one can
> then display as an animation.
>
> I've thought of this approach:
>
> 1. Make a Metapost drawing of each stage, with the visible parts
>    in black and the not-yet visible parts white.  This is the
>    same drawing each time with only the colors varying so that
>    there is no problem about superimposing frames of different size.
> 2. Import the Postscript files into GIMP and get it to make them
>    into an animated GIF.
>
> Questions:
>
> 1. If you straight off know amuch better way, please tell me.
> 2. For stage 1, is there a way in which I can implement the
>    following algorithm in Metapost?
>
>    a. Draw everything in white
>    b. for k=1 to n, draw k-th stage in black and export current
>        version of the drawing as postscript.
>
> Dirk
> --
> http://tug.org/metapost/
>

You can also use MetaPost to make swf animations
http://melusine.eu.org/syracuse/metapost/animations/chupin/?idsec=devcercle

-- 
luigi



More information about the metapost mailing list