color ORANGE, GREEN, WHITE, YELLOW, GREY; ORANGE = 0.9(1.0,0.9,0.8); GREEN = 0.9(0.8,0.9,0.8); YELLOW = 0.9(1.0,1.0,0.8); GREY = 0.8WHITE; WHITE = (1,1,1); numeric pages; pages = 10; def reptiles( expr thispage, lastpage ) = save p, centre, offset, offY, offG, offO, reptile, paths, width, height, rotAngle, ratio, s; pair p[], centre, offset, offY, offG, offO; path reptile, paths[]; numeric width, height, rotAngle, ratio, s; pickup pencircle scaled 1; width = 279.4mm; height = 215.9mm; rotAngle=30*(lastpage-thispage+1)/(lastpage+1); ratio = (thispage+1)/(lastpage+1); centre=(0.50width,0.55height); s := height/5.5; pickup pencircle scaled 1; p1=s*up; p2=p1 rotated60; p3=p2 rotated60; p4=p3 rotated60; p5=p4 rotated60; p6=p5 rotated60; % part of body touching head of neighbour p7=p1 shifted (-0.12s,-0.42s); p8=p7 shifted (-0.14s,-0.06s); p9=0.25[p2,p1]; % left arm p10=p9 +s*(-0.05, 0.35); p11=p10+s*(-0.12, 0.07); p12=p11+s*(-0.20,-0.16); p13=p12+s*( 0.03,-0.11); p14=p13+s*( 0.10,-0.03); % part of body touching tail of neighbour p15=p2 +s*( 0.37,-0.25); p16=p15+s*( 0.03,-0.35); p17=p16+s*(-0.10, 0.20); p18=0.67[p3,p2]; % left leg p19=p18+s*(-0.08,-0.05); p20=p19+s*(-0.12,-0.48); p21=p20+s*(-0.09,-0.08); p22=p21+s*(-0.01,-0.10); % part of body touching right arm of neighbour p23=p4 +s*( 0.15, 0.20); p24=0.62[p4,p5]; % right leg p25=p24+s*( 0.20,-0.40); p26=p25+s*( 0.22, 0.05); p27=p26+s*(-0.07, 0.07); reptile = p1--p7--p8--p9-- p10--p11--p12--p13--p14-- p2--p15--p16--p17--p18-- p19--p20--p21--p22-- p3-- (p22--p21--p20--p19-- p18--p17--p16--p15) rotatedaround (p3,240)-- p4--p23--p24-- p25--p26--p27-- p5-- (p27--p26--p25-- p24--p23) rotatedabout (p5,240)-- p6-- (p14--p13--p12--p11--p10-- p9--p8--p7--p1) rotatedabout (p1,120) --cycle; p28 = 0.25[p1,p9 rotatedabout (p1,120)]+s*(-0.10,-0.16); p29 = 0.2[p1,p9 rotatedabout (p1,120)]; p30 = 0.8[p1,p9 rotatedabout (p1,120)]+s*(-0.10,-0.10); p31 = 0.8[p1,p9 rotatedabout (p1,120)]+s*(-0.02, 0.06); offset := centre-(1.3*p1); offY := offset + (1.75*(1-ratio)*s*(-0.55,0.6)); offG := offset + (0.75*(1-ratio)*s*(-1.2,-0.35sqrt3)); offO := offset + (1.75*(1-ratio)*s*(0.75,0.1)); pickup pencircle scaled 2; paths[1] = ((p16+s*(-0.02,0.10)) rotatedabout (p3,240).. 0.85[p3,p4].. s*(0.05,0.00).. 0.61[p2,p6]+s*(0.00,0.08).. 0.62[p2,p6]+s*(0.00,0.11).. 0.64[p2,p6]+s*(0.00,0.14) ); paths[2] = ((p16+s*(-0.02,0.10)) rotatedabout (p3,240).. 0.81[p3,p4].. 0.78[p3,p4]+s*(0.10,0.10).. s*(-0.02,0.00).. 0.57[p2,p6]+s*( 0.00,0.00).. 0.60[p2,p6]+s*( 0.00,0.15).. 0.60[p2,p6]+s*( 0.00,0.25) ); paths[3] = 0.56[p2,p6]+s*(0.00,0.08)-- p28--p29-- p29+s*(0.19, 0.06)-- 0.72[p2,p6]+s*( 0.00,0.53); paths[4] = 0.65[p2,p6]-- p30--p31-- p31+s*(-0.03, 0.15)-- 0.78[p2,p6]+s*(0.00,0.47); paths[5] = 0.20[p28,p29].. 0.50[p28,p29]+s*(-0.03,0.00).. 0.80[p28,p29]-- 0.20[p28,p29]--cycle; paths[6] = 0.10[p28,p29].. 0.50[p28,p29]+s*(-0.06,0.00).. 0.90[p28,p29]-- 0.10[p28,p29]--cycle; paths[7] = 0.20[p30,p31].. 0.50[p30,p31]+s*( 0.03,0.00).. 0.80[p30,p31]-- 0.20[p30,p31]--cycle; paths[8] = 0.10[p30,p31].. 0.50[p30,p31]+s*( 0.06,0.00).. 0.90[p30,p31]-- 0.10[p30,p31]--cycle; fill reptile rotatedabout (p1,rotAngle) shifted offG withcolor GREEN; for i=1 upto 8: draw paths[i] rotatedabout(p1,rotAngle) shifted offG withcolor 0.92*GREEN; endfor; fill paths[5] rotatedabout(p1,rotAngle) shifted offG withcolor 0.92*GREEN; fill paths[7] rotatedabout(p1,rotAngle) shifted offG withcolor 0.92*GREEN; draw reptile rotatedabout (p1,rotAngle) shifted offG withcolor GREY; fill reptile rotatedabout (p1,120+rotAngle) shifted offO withcolor ORANGE; for i=1 upto 8: draw paths[i] rotatedabout(p1,120+rotAngle) shifted offO withcolor 0.92*ORANGE; endfor; fill paths[5] rotatedabout(p1,120+rotAngle) shifted offO withcolor 0.92*ORANGE; fill paths[7] rotatedabout(p1,120+rotAngle) shifted offO withcolor 0.92*ORANGE; draw reptile rotatedabout (p1,120+rotAngle) shifted offO withcolor GREY; fill reptile rotatedabout (p1,-120+rotAngle) shifted offY withcolor YELLOW; for i=1 upto 8: draw paths[i] rotatedabout(p1,240+rotAngle) shifted offY withcolor 0.92*YELLOW; endfor; fill paths[5] rotatedabout(p1,240+rotAngle) shifted offY withcolor 0.92*YELLOW; fill paths[7] rotatedabout(p1,240+rotAngle) shifted offY withcolor 0.92*YELLOW; draw reptile rotatedabout (p1,-120+rotAngle) shifted offY withcolor GREY; pickup pencircle scaled 1; draw(0,0)--(width,0)--(width,height)--(0,height)--cycle withcolor WHITE; enddef; for i = 0 upto pages: beginfig( i ); reptiles( i, pages ); endfig; endfor; end.