Fichier ex14.mp (figure 1) — Modifié le 5 Août 2008 à 16 h 34

ex14.mp (figure 1)
Source

input mp-solid

m:=90/4;
Scos=cosd(m)+cosd(2*m)+cosd(3*m);
h:=1;
R:=2;
r:=1;
Z0:=h/4;
C:=Z0/Scos;
Z1:=Z0+C*cosd(m);
Z2:=Z1+C*cosd(2*m);
R1:=R-C*sind(m);
R2:=R1-C*sind(2*m);
R3:=R2-C*sind(3*m);

path pp;
pp=(R,-h/4)--(R,h/4)--(R1,Z1)--(R2,Z2)--(R3,h/2)--(r,h/2)--(r,-h/2)--(R3,-h/2)--(R2,-Z2)--(R1,-Z1)--cycle;

h:=1;
R:=1.5;
r:=1;
Z0:=h/4;
C:=Z0/Scos;
Z1:=Z0+C*cosd(m);
Z2:=Z1+C*cosd(2*m);
R1:=R-C*sind(m);
R2:=R1-C*sind(2*m);
R3:=R2-C*sind(3*m);

path pr;
pr=(R,-h/4)--(R,h/4)--(R1,Z1)--(R2,Z2)--(R3,h/2)--(r,h/2)--(r,-h/2)--(R3,-h/2)--(R2,-Z2)--(R1,-Z1)--cycle;

figureespace(-10u,-10u,10u,10u);
Initialisation(1000,15,15,25);
TraceAxesD(5,5,5);
outcolor:=white;
%avant
subh:=36;
Ferme1:=true;
angx:=90;angz:=90;
TR:=(3,4,2);
ObjetAnneau1("nbp=10",pp);
Ferme2:=true;
TR:=(-3,4,2);
ObjetAnneau2("nbp=10",pp);
nb:=16;subh:=4;
Objetcylindre3("r=0.1","h=6");
%arriere
subh:=36;
Ferme4:=true;
angx:=90;angz:=110;
TR:=(3,-4,1.5);
ObjetAnneau4("nbp=10",pr);
Ferme5:=true;
TR:=(-3,-4,1.5);
ObjetAnneau5("nbp=10",pr);
nb:=16;subh:=4;
angz:=90;
Objetcylindre6("r=0.1","h=6");
%chassis
nb:=16;subh:=4;
angx:=100;angz:=0;
TR:=(0,4,2.5);
Objetcylindre7("r=1","h=8");
%%---affichage
nbobj:=7;
DessineFusion;
finespace;
end