On 16-4-2010 9:36, BoĊĦtjan Vesnicer wrote:
Hi Troy
Here is a simple solution:
\def\MyGraphics#1{% \startMPcode path p,q; p:=fullcircle scaled 72; L:=length p; N:=20; q:=subpath (0,#1/N*L) of p; draw q withcolor red; fill fullcircle scaled 3 shifted point length q of q withcolor blue; setbounds currentpicture to unitsquare shifted (-0.5,-0.5) scaled 75; \stopMPcode}
\starttext \dostepwiserecurse{0}{20}{1}{% \startTEXpage \MyGraphics{\recurselevel} \stopTEXpage} \stoptext
or, if you want to fool yourself that you're not using tex ... put this in "somefile.cld": -- -- local template = [[ path p, q ; p := fullcircle scaled 72 ; L := length p ; N := 20 ; q:=subpath (0,%s/N*L) of p ; draw q withcolor red ; fill fullcircle scaled 3 shifted point length q of q withcolor blue ; setbounds currentpicture to unitsquare shifted (-0.5,-0.5) scaled 75 ; ]] context.starttext() for i=0,20 do context.startMPpage() context(template,i) context.stopMPpage() end context.stoptext() -- -- and then run: context somefile.cld ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------