Fichier ex03.mp (figure 1) — Modifié le 3 Août 2008 à 15 h 33

ex03.mp (figure 1)
Source

input mp-solid;

vardef Transform(expr PT)=RotY(RotX(RotZ(PT)))
enddef;

transformation:=true;

%43"
figureespace(-10u,-10u,10u,10u);
fill feuillet;
for k=1 upto 100:
  fill fullcircle scaled (2*uniformdeviate(1)*mm) shifted((uniformdeviate(1))[coinbg,coinbd]+uniformdeviate(1)*(coinhg-coinbg)) withcolor jaune;
endfor;

Initialisation(500,30,20,50);
unit:=0.2;
traits:=false;
angy:=90;
outcolor:=rouge;
path rocket[];
rocket1=(0,4.6)--(-0.8,4.6)--(-0.85,5.6)--(-0.95,6.6)--(-1.05,7.6)--(-1.1,8.6)--(-1.2,9.6);
rocket2=(-1.2,9.6)--(-1.25,10.6)--(-1.3,11.6)--(-1.35,12.6)--(-1.4,13.6)--(-1.4,14.6)--(-1.375,15.6)--(-1.27,16.6)--(-1.2,17.6)--(-1.05,18.6);
rocket3=(-1.05,18.6)--(-0.85,19.6)--(-0.65,20.6)--(-0.35,21.6)--(-0.1,22.2)--(-0.1,23.75)--(0,23.75);
subh:=24;
perso1:=true;
Ferme1:=false;
string couleurperso;
couleurperso="if ((tapj mod 48)=0) or ((tapj mod 48)=1) or ((tapj mod 48)=2) or ((tapj mod 48)=6) or ((tapj mod 48)=7) or ((tapj mod 48)=8) or ((tapj mod 48)=12) or ((tapj mod 48)=13) or ((tapj mod 48)=14) or ((tapj mod 48)=18) or ((tapj mod 48)=19) or ((tapj mod 48)=20) or ((tapj mod 48)=27) or ((tapj mod 48)=28) or ((tapj mod 48)=29) or ((tapj mod 48)=33) or ((tapj mod 48)=34) or ((tapj mod 48)=35) or ((tapj mod 48)=39) or ((tapj mod 48)=40) or ((tapj mod 48)=41) or ((tapj mod 48)=45) or ((tapj mod 48)=46) or ((tapj mod 48)=47):red else: white fi;";
TR:=(0,-15,0);
ObjetAnneau1("nbp=10",rocket2);
outcolor:=rouge;
for k=2 upto 6:
  Ferme[k]:=true;
endfor;
ObjetAnneau2("nbp=7",rocket1);
ObjetAnneau3("nbp=7",rocket3);
path amortisseur;
amortisseur=for k=-90 step 10 until 0:(cosd(k),sind(k)+1)--endfor for k=0 step 2 until 22:(cosd(k)*11.78-10.78,11.78*sind(k)+1)-- endfor (0,5.75);
TR:=(0,-15,0)+(0,-5,0);
ObjetAnneau4("nbp=22",amortisseur);
angz:=90;
TR:=(0,0,0);
TR:=(0,-15,0)+Image((0,-5,0));
ObjetAnneau5("nbp=22",amortisseur);
angz:=-150;
TR:=(0,0,0);
TR:=(0,-15,0)+Image((0,-5,0));
ObjetAnneau6("nbp=22",amortisseur);
TR:=(0,-15,0)+(0,0,0);
angz:=0;
subh:=1;
ObjetBiface7((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4));
angz:=90;
ObjetBiface8((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4));
angz:=-150;
ObjetBiface9((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4));
nbobj:=9;
DessineFusion;
finespace;
end