prologues:=2;
input geometriesyr16;
%octaedre
figureespace(-10u,-10u,10u,10u);
Initialisation(5,22,20,500);
%%Sommets
NbS:=6;
Sommet1:=(0,0,1);
Sommet2:=(1,0,0);
Sommet3:=(0,1,0);
Sommet4:=(-1,0,0);
Sommet5:=(0,-1,0);
Sommet6:=(0,0,-1);
%%Faces
NF:=8;
Fc[100]:=3;Fc[101]:=1;Fc[102]:=5;Fc[103]:=2;
Fc[200]:=3;Fc[201]:=2;Fc[202]:=3;Fc[203]:=1;
Fc[300]:=3;Fc[301]:=1;Fc[302]:=3;Fc[303]:=4;
Fc[400]:=3;Fc[401]:=4;Fc[402]:=5;Fc[403]:=1;
Fc[500]:=3;Fc[501]:=2;Fc[502]:=6;Fc[503]:=3;
Fc[600]:=3;Fc[601]:=3;Fc[602]:=6;Fc[603]:=4;
Fc[700]:=3;Fc[701]:=4;Fc[702]:=6;Fc[703]:=5;
Fc[800]:=3;Fc[801]:=5;Fc[802]:=6;Fc[803]:=2;
DessineObjet;
finespace;
%icosaedre
figureespace(-10u,-10u,10u,10u);
Initialisation(5,22,20,500);
%%Sommets
NbS:=12;
Sommet1:=(0.8944271,0,0.4472137);
Sommet2:=(0.2763932,0.8506507,0.4472137);
Sommet3:=(-0.7236067,0.5257311,0.4472137);
Sommet4:=(-0.7236067,-0.5257311,0.4472137);
Sommet5:=(0.2763932,-0.8506507,0.4472137);
Sommet6:=(0,0,1);
Sommet7:=(0,0,-1);
Sommet8:=(-0.8944271,0,-0.4472137);
Sommet9:=(-0.2763932,-0.8506507,-0.4472137);
Sommet10:=(0.7236067,-0.5257311,-0.4472137);
Sommet11:=(0.7236067,0.5257311,-0.4472137);
Sommet12:=(-0.2763932,0.8506507,-0.4472137);
%%Faces
NF:=20;
Fc[100]:=3;Fc[101]:=1;Fc[102]:=2;Fc[103]:=6;
Fc[200]:=3;Fc[201]:=2;Fc[202]:=3;Fc[203]:=6;
Fc[300]:=3;Fc[301]:=3;Fc[302]:=4;Fc[303]:=6;
Fc[400]:=3;Fc[401]:=4;Fc[402]:=5;Fc[403]:=6;
Fc[500]:=3;Fc[501]:=5;Fc[502]:=1;Fc[503]:=6;
Fc[600]:=3;Fc[601]:=10;Fc[602]:=1;Fc[603]:=5;
Fc[700]:=3;Fc[701]:=1;Fc[702]:=10;Fc[703]:=11;
Fc[800]:=3;Fc[801]:=11;Fc[802]:=2;Fc[803]:=1;
Fc[900]:=3;Fc[901]:=2;Fc[902]:=11;Fc[903]:=12;
Fc[1000]:=3;Fc[1001]:=12;Fc[1002]:=3;Fc[1003]:=2;
Fc[1100]:=3;Fc[1101]:=3;Fc[1102]:=12;Fc[1103]:=8;
Fc[1200]:=3;Fc[1201]:=3;Fc[1202]:=8;Fc[1203]:=4;
Fc[1300]:=3;Fc[1301]:=4;Fc[1302]:=8;Fc[1303]:=9;
Fc[1400]:=3;Fc[1401]:=4;Fc[1402]:=9;Fc[1403]:=5;
Fc[1500]:=3;Fc[1501]:=5;Fc[1502]:=9;Fc[1503]:=10;
Fc[1600]:=3;Fc[1601]:=7;Fc[1602]:=8;Fc[1603]:=12;
Fc[1700]:=3;Fc[1701]:=7;Fc[1702]:=9;Fc[1703]:=8;
Fc[1800]:=3;Fc[1801]:=7;Fc[1802]:=10;Fc[1803]:=9;
Fc[1900]:=3;Fc[1901]:=7;Fc[1902]:=11;Fc[1903]:=10;
Fc[2000]:=3;Fc[2001]:=7;Fc[2002]:=12;Fc[2003]:=11;
DessineObjet;
finespace;
%dodecaedre
figureespace(-10u,-10u,10u,10u);
Initialisation(5,22,20,500);
%%Sommets
NbS:=20;
Sommet1:=(0,0.607062,0.7946545);
Sommet2:=(-0.5773503,0.1875925,0.7946545);
Sommet3:=(-0.3568221,-0.4911235,0.7946545);
Sommet4:=(0.3568221,-0.4911235,0.7946545);
Sommet5:=(0.5773503,0.1875925,0.7946545);
Sommet6:=(0,0.982247,0.1875925);
Sommet7:=(-0.9341724,0.303531,0.1875925);
Sommet8:=(-0.5773503,-0.7946645,0.1875925);
Sommet9:=(0.5773503,-0.7946645,0.1875925);
Sommet10:=(0.9341724,0.303531,0.1875925);
Sommet11:=(0,-0.982247,-0.1875925);
Sommet12:=(0.9341724,-0.303531,-0.1875925);
Sommet13:=(0.5773503,0.7946545,-0.1875925);
Sommet14:=(-0.5773503,0.7946545,-0.1875925);
Sommet15:=(-0.9341724,-0.303531,-0.1875925);
Sommet16:=(-0.5773503,-0.1875925,-0.7946545);
Sommet17:=(-0.3568221,0.4911235,-0.7946545);
Sommet18:=(0.3568221,0.4911235,-0.7946545);
Sommet19:=(0.5773503,-0.1875925,-0.7946545);
Sommet20:=(0,-0.607062,-0.7946545);
%%Faces
NF:=12;
Fc[100]:=5;Fc[101]:=1;Fc[102]:=2;Fc[103]:=3;Fc[104]:=4;Fc[105]:=5;
Fc[200]:=5;Fc[201]:=5;Fc[202]:=4;Fc[203]:=9;Fc[204]:=12;Fc[205]:=10;
Fc[300]:=5;Fc[301]:=5;Fc[302]:=10;Fc[303]:=13;Fc[304]:=6;Fc[305]:=1;
Fc[400]:=5;Fc[401]:=1;Fc[402]:=6;Fc[403]:=14;Fc[404]:=7;Fc[405]:=2;
Fc[500]:=5;Fc[501]:=2;Fc[502]:=7;Fc[503]:=15;Fc[504]:=8;Fc[505]:=3;
Fc[600]:=5;Fc[601]:=3;Fc[602]:=8;Fc[603]:=11;Fc[604]:=9;Fc[605]:=4;
Fc[700]:=5;Fc[701]:=11;Fc[702]:=20;Fc[703]:=19;Fc[704]:=12;Fc[705]:=9;
Fc[800]:=5;Fc[801]:=12;Fc[802]:=19;Fc[803]:=18;Fc[804]:=13;Fc[805]:=10;
Fc[900]:=5;Fc[901]:=13;Fc[902]:=18;Fc[903]:=17;Fc[904]:=14;Fc[905]:=6;
Fc[1000]:=5;Fc[1001]:=14;Fc[1002]:=17;Fc[1003]:=16;Fc[1004]:=15;Fc[1005]:=7;
Fc[1100]:=5;Fc[1101]:=15;Fc[1102]:=16;Fc[1103]:=20;Fc[1104]:=11;Fc[1105]:=8;
Fc[1200]:=5;Fc[1201]:=16;Fc[1202]:=17;Fc[1203]:=18;Fc[1204]:=19;Fc[1205]:=20;
DessineObjet;
finespace;
%prisme vertical à base triangle rectangle
figureespace(-10u,-10u,10u,10u);
Initialisation(5,30,30,500);
color A,B,C,D,E,F;
D=(0.75,0,0);
F=(0.75,1/2,0);
E=(0,1/2,0);
A-D=(0,0,1);
C-F=A-D;
B-E=A-D;
NbS:=6;
Sommet1:=A;
Sommet2:=B;
Sommet3:=C;
Sommet4:=D;
Sommet5:=E;
Sommet6:=F;
NF:=5;
Fc[100]:=3;Fc[101]:=1;Fc[102]:=3;Fc[103]:=2;
Fc[200]:=3;Fc[201]:=4;Fc[202]:=5;Fc[203]:=6;
Fc[300]:=4;Fc[301]:=1;Fc[302]:=2;Fc[303]:=5;Fc[304]:=4;
Fc[400]:=4;Fc[401]:=1;Fc[402]:=4;Fc[403]:=6;Fc[404]:=3;
Fc[500]:=4;Fc[501]:=3;Fc[502]:=6;Fc[503]:=5;Fc[504]:=2;
DessineObjet;
trace codeperp(A,C,B,5);
nomme.lft(A);
nomme.top(B);
nomme.lrt(C);
nomme.rt(E);
nomme.bot(F);
nomme.llft(D);
finespace;
%prisme horizontal à base trapèze rectangle.
figureespace(-10u,-10u,10u,10u);
Initialisation(5,30,15,500);
color A,B,C,D,E,F,G,H;
D=(0.75,0,0);
G=(0,1,0);
H=(0,0,0);
A-D=(0,0,0.5);
C-D=G-H;
E-H=A-D;
F-E=(0,0.6,0);
B-A=F-E;
NbS:=8;
Sommet1:=A;
Sommet2:=B;
Sommet3:=C;
Sommet4:=D;
Sommet5:=E;
Sommet6:=F;
Sommet7:=G;
Sommet8:=H;
NF:=6;
Fc[100]:=4;Fc[101]:=1;Fc[102]:=4;Fc[103]:=3;Fc[104]:=2;
Fc[200]:=4;Fc[201]:=4;Fc[202]:=1;Fc[203]:=5;Fc[204]:=8;
Fc[300]:=4;Fc[301]:=4;Fc[302]:=8;Fc[303]:=7;Fc[304]:=3;
Fc[400]:=4;Fc[401]:=5;Fc[402]:=6;Fc[403]:=7;Fc[404]:=8;
Fc[500]:=4;Fc[501]:=1;Fc[502]:=2;Fc[503]:=6;Fc[504]:=5;
Fc[600]:=4;Fc[601]:=2;Fc[602]:=3;Fc[603]:=7;Fc[604]:=6;
DessineObjet;
trace codeperp(D,A,B,5);
trace codeperp(C,D,A,5);
nomme.lft(A);
nomme.top(B);
nomme.lrt(C);
nomme.top(E);
nomme.urt(F);
nomme.lft(D);
nomme.rt(G);
nomme.bot(H);
finespace;
%prisme à base triangle rectangle v2
figureespace(-10u,-10u,10u,10u);
Initialisation(5,30,20,500);
NbS:=6;
Sommet1:=(0,0,1);
Sommet2:=(0,2,1);
Sommet3:=(-2,0,1);
Sommet4:=(0,0,0);
Sommet5:=(0,2,0);
Sommet6:=(-2,0,0);
%%Faces
NF:=5;
Fc[100]:=3;Fc[101]:=1;Fc[102]:=2;Fc[103]:=3;
Fc[300]:=4;Fc[301]:=1;Fc[302]:=4;Fc[303]:=5;Fc[304]:=2;
Fc[200]:=4;Fc[201]:=2;Fc[202]:=5;Fc[203]:=6;Fc[204]:=3;
Fc[400]:=4;Fc[401]:=3;Fc[402]:=6;Fc[403]:=4;Fc[404]:=1;
Fc[500]:=3;Fc[501]:=4;Fc[502]:=6;Fc[503]:=5;
DessineObjet;
finespace;
%prisme à base triangle rectangle v3
figureespace(-10u,-10u,10u,10u);
Initialisation(5,45,20,400);
color A,B,C,D,E,F;
B=(0,0,0);
A-B=(0,0,1);
C-B=(7/5,0,0);
E-B=(0,9/5,0);
D-E=A-B;
F-E=C-B;
NbS:=6;
Sommet1:=A;
Sommet2:=B;
Sommet3:=C;
Sommet4:=D;
Sommet5:=E;
Sommet6:=F;
NF:=5;
Fc[100]:=3;Fc[101]:=1;Fc[102]:=2;Fc[103]:=3;
Fc[200]:=3;Fc[201]:=6;Fc[202]:=5;Fc[203]:=4;
Fc[300]:=4;Fc[301]:=4;Fc[302]:=5;Fc[303]:=2;Fc[304]:=1;
Fc[400]:=4;Fc[401]:=5;Fc[402]:=6;Fc[403]:=3;Fc[404]:=2;
Fc[500]:=4;Fc[501]:=1;Fc[502]:=3;Fc[503]:=6;Fc[504]:=4;
DessineObjet;
trace codeperp(A,B,C,8);
trace codeperp(A,B,E,8);
trace codeperp(D,E,F,8);
trace segment(A,F);
trace segment(A,E) dashed evenly;
nomme.top(A);
nomme.top(D);
nomme.rt(E);
nomme.lrt(F);
nomme.llft(C);
nomme.bot(B);
finespace;
%Pyramide à base carrée
figureespace(-10u,-10u,10u,10u);
Initialisation(5,30,20,500);
%%Pave
NbS:=5;
Sommet1:=(0,0,1);
Sommet2:=(-1,-1,0);
Sommet3:=(1,-1,0);
Sommet4:=(1,1,0);
Sommet5:=(-1,1,0);
%%Faces
NF:=5;
Fc[100]:=3;Fc[101]:=1;Fc[102]:=2;Fc[103]:=3;
Fc[200]:=3;Fc[201]:=1;Fc[202]:=3;Fc[203]:=4;
Fc[300]:=3;Fc[301]:=1;Fc[302]:=4;Fc[303]:=5;
Fc[400]:=3;Fc[401]:=1;Fc[402]:=5;Fc[403]:=1;
Fc[500]:=4;Fc[501]:=2;Fc[502]:=5;Fc[503]:=4;Fc[504]:=3;
DessineObjet;
finespace;
%pyramide régulière à base hexagonale
figureespace(-10u,-10u,10u,10u);
Initialisation(5,22,20,500);
color A,B,C,D,E,F,S,O;
O=(0,0,0);
C=(1,0,0);
D=(cosd(60),sind(60),0);
E=(cosd(120),sind(120),0);
F=(cosd(180),sind(180),0);
A=(cosd(240),sind(240),0);
B=(cosd(300),sind(300),0);
S=(0,0,1);
NbS:=7;
Sommet1:=A;
Sommet2:=B;
Sommet3:=C;
Sommet4:=D;
Sommet5:=E;
Sommet6:=F;
Sommet7:=S;
NF:=7;
Fc[100]:=6;Fc[101]:=6;Fc[102]:=5;Fc[103]:=4;Fc[104]:=3;Fc[105]:=2;Fc[106]:=1;
Fc[200]:=3;Fc[201]:=1;Fc[202]:=2;Fc[203]:=7;
Fc[300]:=3;Fc[301]:=2;Fc[302]:=3;Fc[303]:=7;
Fc[400]:=3;Fc[401]:=3;Fc[402]:=4;Fc[403]:=7;
Fc[500]:=3;Fc[501]:=4;Fc[502]:=5;Fc[503]:=7;
Fc[600]:=3;Fc[601]:=5;Fc[602]:=6;Fc[603]:=7;
Fc[700]:=3;Fc[701]:=6;Fc[702]:=1;Fc[703]:=7;
DessineObjet;
nomme.top(S);
nomme.bot(C);
nomme.lrt(D);
nomme.urt(E);
nomme.bot(F);
nomme.ulft(A);
nomme.lft(B);
marque_p:="croix";
nomme.bot(O);
marque_p:="non";
finespace;
%pyramide horizontale
figureespace(-10u,-10u,10u,10u);
Initialisation(5,22,20,450);
color A,B,C,D,E,F,G,O;
O=(0,0,0);
C=(1,0,0);
D=(cosd(60),0,sind(60));
E=(cosd(120),0,sind(120));
F=(cosd(180),0,sind(180));
A=(cosd(240),0,sind(240));
B=(cosd(300),0,sind(300));
G=(0,1,0);
NbS:=7;
Sommet1:=A;
Sommet2:=B;
Sommet3:=C;
Sommet4:=D;
Sommet5:=E;
Sommet6:=F;
Sommet7:=G;
NF:=7;
Fc[100]:=6;Fc[101]:=6;Fc[102]:=5;Fc[103]:=4;Fc[104]:=3;Fc[105]:=2;Fc[106]:=1;
Fc[200]:=3;Fc[201]:=1;Fc[202]:=2;Fc[203]:=7;
Fc[300]:=3;Fc[301]:=2;Fc[302]:=3;Fc[303]:=7;
Fc[400]:=3;Fc[401]:=3;Fc[402]:=4;Fc[403]:=7;
Fc[500]:=3;Fc[501]:=4;Fc[502]:=5;Fc[503]:=7;
Fc[600]:=3;Fc[601]:=5;Fc[602]:=6;Fc[603]:=7;
Fc[700]:=3;Fc[701]:=6;Fc[702]:=1;Fc[703]:=7;
DessineObjet;
drawoptions(dashed dashpattern(on12bp off6bp on3bp off6bp) withcolor gris);
trace segment(A,D);
trace segment(B,E);
trace segment(C,F);
drawoptions();
trace segment(O,G) dashed evenly;
trace codeperp(A,O,G,8);
nomme.rt(G);
nomme.lft(C);
nomme.ulft(D);
nomme.urt(E);
nomme.lft(F);
nomme.lrt(A);
nomme.bot(B);
nomme.ulft(O);
finespace;
%pyramide trirectangle
figureespace(-10u,-10u,10u,10u);
Initialisation(5,30,20,750);
color S,A,B,C;
S=3/4*(0,0,1);
A=3/4*(0,0,0);
B=3/4*(0,4/3,0);
C=3/4*(4/3,4/3,0);
NbS:=4;
Sommet1:=A;
Sommet2:=B;
Sommet3:=C;
Sommet4:=S;
NF:=4;
Fc[100]:=3;Fc[101]:=2;Fc[102]:=3;Fc[103]:=1;
Fc[200]:=3;Fc[201]:=2;Fc[202]:=1;Fc[203]:=4;
Fc[300]:=3;Fc[301]:=4;Fc[302]:=1;Fc[303]:=3;
Fc[400]:=3;Fc[401]:=4;Fc[402]:=3;Fc[403]:=2;
DessineObjet;
trace codeperp(A,B,C,10);
trace codeperp(S,A,B,15);
trace codeperp(S,A,C,10);
nomme.llft(A);
nomme.top(S);
nomme.rt(B);
nomme.lrt(C);
finespace;
%bicoin
figureespace(-10u,-10u,10u,10u);
Initialisation(5,30,40,500);
color A,B,C,D;
A=(0,0,0);
C-A=(0,1,0);
D-A=(0,0,1/2);
B-iso(A,C)=Distance(iso(A,C),C)*((C-iso(A,C))*cosd(-40)/Distance(iso(A,C),C)+(iso(A,C)+(-1,1/2,0)-A-iso(A,C))*sind(-40)/Distance(iso(A,C),iso(A,C)+(-1,1/2,0)-A));
NbS:=4;
Sommet1:=A;
Sommet2:=B;
Sommet3:=C;
Sommet4:=D;
NF:=4;
Fc[100]:=3;Fc[101]:=1;Fc[102]:=3;Fc[103]:=2;
Fc[200]:=3;Fc[201]:=1;Fc[202]:=2;Fc[203]:=4;
Fc[300]:=3;Fc[301]:=3;Fc[302]:=1;Fc[303]:=4;
Fc[400]:=3;Fc[401]:=2;Fc[402]:=3;Fc[403]:=4;
DessineObjet;
finespace;
end