MetaPost / Des bolygones…

bolygones.mp

bolygones.1 bolygones.2 bolygones.3 bolygones.4 bolygones.5
 
 color c[];
 c1 := (0.18,0.31,0.31); % DarkSlateGrey
 c2 := (0.72,0.53,0.04); % DarkGoldenRod
 c3 := (0.00,0.81,0.82); % DarkTurquoise
 c4 := (1.00,0.27,0.00); % OrangeRed 
 c5 := (0.60,0.20,0.80); % DarkOrchid
 c6 := (0.63,0.32,0.18); % Sienna
 
 R := 5cm;
 
 
Conversion au format PDF de bolygones.1
Vers la liste des images
 beginfig(1);
 
     fill fullcircle scaled 2R withcolor 0.5[c3,white];
         
     for i=0 step 5 until 360:
 	draw ((cosd(i),sind(i))--(cosd(2i),sind(2i))) 
 	    scaled R 
 	    withcolor c6;
     endfor;
     
     draw fullcircle scaled 2R;
 
 endfig;
 
 
Conversion au format PDF de bolygones.2
Vers la liste des images
 beginfig(2);
 
     fill fullcircle scaled 2R withcolor 0.5[c2,white];
     
     for i=0 step 4 until 360:
 	draw ((cosd(i),sind(i))--(cosd(3i),sind(3i))) 
 	    scaled R 
 	    withcolor c2;
     endfor;
 
     draw fullcircle scaled 2R;
 
 endfig;
 
 
Conversion au format PDF de bolygones.3
Vers la liste des images
 beginfig(3);
 
     fill fullcircle scaled 2R withcolor 0.5[c4,white];
         
     for i=0 step 2 until 360:
 	draw ((cosd(i),sind(i))--(cosd(4i),sind(4i))) 
 	    scaled R 
 	    withcolor c4;
     endfor;
 
     draw fullcircle scaled 2R;
 
 endfig;
 
 
Conversion au format PDF de bolygones.4
Vers la liste des images
 beginfig(4);
 
     fill fullcircle scaled 2R withcolor 0.5[c5,white];
     
     for i=0 step 2 until 360:
 	draw ((cosd(i),sind(i))--(cosd(5i),sind(5i))) 
 	    scaled R 
 	    withcolor red;
     endfor;
 
     draw fullcircle scaled 2R;
 
 endfig;
 
 path c;
 
 vardef P(expr i) = point (i/360*length(c)) of c enddef;
 
 
Conversion au format PDF de bolygones.5
Vers la liste des images
 beginfig(5);
     
     c := (312,466)--(112,276)--(148,09)--(496,062)--(523,390)-- cycle;
     fill c withcolor 0.75[c1,white];
     
     for i=1 step 2 until 360:
 	draw (P(i)--P(2i mod 360)) withcolor c1;
     endfor;
     
     draw c;
 
 endfig;
 
 end
fichier mp

 

Validation CSS Validation XHTMLJean-Michel Sarlat — Dernière modification : 26 juillet 2008 (0.07s - 3949650 - vendredi 9 janvier 2009) vers le haut