That works great. Now I have defined a global numeric
N:=8;
in \startMPinclusions ... \stopMPinclusions at the be beginning of my document. All of my \startMPpage ... \stopMPpage environments understand this N, but how do I reference this value as the start value for \dostepwiserecurse? That is, I would like to do something like
\dostepwiserecurse{N}{0}{-1}{ ... <some code> ... }
For that, you'll need to work on the TeX end. \edef\STEPS{8} \dorecurse\STEPS{....} You can either use \STEPS instead of N everywhere in your code (and be careful on how TeX code is parsed, i.e., `a := \STEPS 0` will evaluate to `a := 80`), or use `N := \STEPS;` somewhere in the beginning of each `\MPpage` (the `N :\ \STEPS` can be hidden behind a macro like `\initializeAnimation`). Aditya