Fichier ex12.mp (figure 1) — Modifié le 4 Août 2008 à 22 h 23

ex12.mp (figure 1)
Source

input mp-solid

color hetre, chene, bois;
hetre=(0.764,0.6,0.204);
chene=(0.568,0.427,0.086);
bois=(0.956,0.921,0.65);

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

transformation:=true;

%1'43"
figureespace(-10u,-10u,10u,10u);
Initialisation(500,50,20,10);
creux:=false;
nb:=18;subh:=18;
angx:=-90;TR:=(0,10.93,0);
outcolor:=hetre;
Objetsphere1("R=2");%H1
TR:=(0,0,0);
outcolor:=bois;
Objetcylindre2("r=0.25","h=10");
angz:=-109.5;
TR:=(0,10.93,0);
outcolor:=hetre;
Objetsphere3("R=2");%H2
TR:=(0,0,0);
outcolor:=bois;
Objetcylindre4("r=0.25","h=10");
angy:=-120;
TR:=(0,10.93,0);
outcolor:=hetre;
Objetsphere5("R=2");%H3
TR:=(0,0,0);
outcolor:=bois;
Objetcylindre6("r=0.25","h=10");
angy:=120;
TR:=(0,10.93,0);
outcolor:=hetre;
Objetsphere7("R=2");%H4
TR:=(0,0,0);
outcolor:=bois;
Objetcylindre8("r=0.25","h=10");
angx:=90;
angy:=0;
angz:=0;
outcolor:=chene;
Objetsphere9("R=3");
nb:=12;subh:=10;
nbobj:=9;
DessineFusion;
finespace;
end