Hi all,

The following example creates a unitcircle scaled to the \recurselevel value on each MPpage.

\starttext
\dostepwiserecurse{1}{80}{1}{
\startMPpage
        path a;
        a := unitsquare xyscaled(80,80) ;
        draw a;
        draw unitcircle xyscaled(\recurselevel , \recurselevel);
\stopMPpage
}
\dostepwiserecurse{79}{2}{-1}{
\startMPpage
        path a;
        a := unitsquare xyscaled(80,80) ;
        draw a;
        draw unitcircle xyscaled(\recurselevel , \recurselevel);
\stopMPpage
}
\stoptext

If you run this and scan through pages, the circle starts at 1 and increases to 80 and then decreases from 79 to 2. I use the pdf to create a mp4 movie showing the circle increasing and decreasing when I replay it as a loop. You can download the file here:

https://1drv.ms/v/c/de5fffb8e01e255b/IQCLuQ9bYQovSIaOc7S5vc8_AQnAfqudRCjr_PC_pT6Rgx8?e=fuq9AS

However if my graphic is complicated, compilation time will increase by quite a bit. So I was thinking that when the circle is decreasing I have already calculated those MPpages as the circle was increasing so could I not reuse those MPpages to create the following sequence of MPpages?

1, 2, 3, ... 78, 79, 80, 79, 78, ...3, 2

i.e I have reused the MPpages 79 to 2 which would loop in a movie when played back.

I though I could make a copy the pdf file then add MPpages from the original file to create the sequence of MPpages above. I've had a look through the merging pdf files manual and it suggests using:

\externalfigure[myfile.pdf][page=4]

but that doesn't seem to work with MPpages since it adds the pdf page as a text page. Any hints on how I can solve this?

Best Wishes
Keith
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to