%@Auteur:Thomas Rey (d'après Thierry Joffredo)
prologues := 2;
input geometriesyr16;
figure(-u,-u,6.5u,6u);
pair A,B,C,D,E,F,G,H,I,J,K;
picture depart;
trace 2coinbg--2coinbd--2coinhd--2coinhg--cycle;
depart=image(
A=(0,0);
B=(4u,-.5u);
C=(5.5u,u);
D-C=A-B;
E=(0,4u);
F-E=B-A;
G-F=C-B;
H-G=D-C;
trace A--B--C--G--H--E--F--G;
trace A--E;
trace B--F;
trace A--D--C dashed evenly;
trace H--D dashed evenly;
nomme.llft(A);
nomme.lrt(B);
nomme.rt(C);
nomme.ulft(D);
nomme.lft(E);
nomme.llft(F);
nomme.urt(G);
nomme.ulft(H);
);% fin du cube de départ
trace depart;
fin;
%2
figure(-u,-u,6.5u,6u);
trace 2coinbg--2coinbd--2coinhd--2coinhg--cycle;
trace depart;
I=.5*(F+E);
J=.5*(F+G);
K=.5*(F+B);
trace I--J--K--I withcolor blue;
nomme.top(I);
nomme.lrt(J);
nomme.rt(K);
fin;
%3
figure(-u,-u,6.5u,6u);
trace 2coinbg--2coinbd--2coinhd--2coinhg--cycle;
trace E--A--B--C--G--J;
trace B--K;
trace G--H--E--I;
trace H--D--C dashed evenly;
trace D--A dashed evenly;
trace I--J--K--I withcolor blue;
fin;
%4
figure(-u,-u,6.5u,6u);
trace 2coinbg--2coinbd--2coinhd--2coinhg--cycle;
pair L,M;
L=.5*(G+H);
M=.5*(G+C);
trace E--A--B--C--M;
trace B--K;
trace L--H--E--I;
trace H--D--C dashed evenly;
trace D--A dashed evenly;
trace I--J--K--I withcolor blue;
trace M--J--L withcolor blue;
trace L--M dashed evenly withcolor blue;
fin;
%5
figure(-u,-u,6.5u,6u);
trace 2coinbg--2coinbd--2coinhd--2coinhg--cycle;
pair N,O;
N=.5*(E+H);
O=.5*(H+D);
trace E--A--B--C--M;
trace B--K;
trace N--E--I;
trace O--D--C dashed evenly;
trace D--A dashed evenly;
trace I--J--K--I withcolor blue;
trace M--J--L withcolor blue;
trace L--M dashed evenly withcolor blue;
trace N--L withcolor blue;
trace N--O--L dashed evenly withcolor blue;
fin;
%6
figure(-u,-u,6.5u,6u);
trace 2coinbg--2coinbd--2coinhd--2coinhg--cycle;
pair P;
P=.5*(A+E);
trace P--A--B--C--M;
trace B--K;
trace O--D--C dashed evenly;
trace D--A dashed evenly;
trace I--J--K--I withcolor blue;
trace M--J--L withcolor blue;
trace L--M dashed evenly withcolor blue;
trace N--L withcolor blue;
trace N--O--L dashed evenly withcolor blue;
trace N--I--P--N withcolor blue;
fin;
%7
figure(-u,-u,6.5u,6u);
trace 2coinbg--2coinbd--2coinhd--2coinhg--cycle;
pair Q,R;
Q=.5*(A+B);
R=.5*(A+D);
trace Q--B--C--M;
trace B--K;
trace O--D--C dashed evenly;
trace D--R dashed evenly;
trace I--J--K--I withcolor blue;
trace M--J--L withcolor blue;
trace L--M dashed evenly withcolor blue;
trace N--L withcolor blue;
trace N--O--L dashed evenly withcolor blue;
trace N--I--P--N withcolor blue;
trace Q--R--P--Q withcolor blue;
fin;
%8
figure(-u,-u,6.5u,6u);
trace 2coinbg--2coinbd--2coinhd--2coinhg--cycle;
pair S;
S=.5*(B+C);
%R=.5*(A+D);
trace S--C--M;
trace O--D--C dashed evenly;
trace D--R dashed evenly;
trace I--J--K--I withcolor blue;
trace M--J--L withcolor blue;
trace L--M dashed evenly withcolor blue;
trace N--L withcolor blue;
trace N--O--L dashed evenly withcolor blue;
trace N--I--P--N withcolor blue;
trace Q--R--P--Q withcolor blue;
trace Q--K--S--Q withcolor blue;
fin;
%9
figure(-u,-u,6.5u,6u);
trace 2coinbg--2coinbd--2coinhd--2coinhg--cycle;
pair T;
T=.5*(C+D);
trace O--D--T dashed evenly;
trace D--R dashed evenly;
trace I--J--K--I withcolor blue;
trace M--J--L withcolor blue;
trace L--M dashed evenly withcolor blue;
trace N--L withcolor blue;
trace N--O--L dashed evenly withcolor blue;
trace N--I--P--N withcolor blue;
trace Q--R--P--Q withcolor blue;
trace Q--K--S--Q withcolor blue;
trace S--T--M dashed evenly withcolor blue;
trace S--M withcolor blue;
fin;
%10
figure(-u,-u,6.5u,6u);
trace 2coinbg--2coinbd--2coinhd--2coinhg--2coinbg;
trace I--J--K--I withcolor blue;
trace M--J--L withcolor blue;
trace L--M dashed evenly withcolor blue;
trace N--L withcolor blue;
trace N--O--L dashed evenly withcolor blue;
trace N--I--P--N withcolor blue;
trace Q--R--P--Q withcolor blue;
trace Q--K--S--Q withcolor blue;
trace S--T--M dashed evenly withcolor blue;
trace S--M withcolor blue;
trace T--R--O--T dashed evenly withcolor blue;
fin;
%11
figure(-u,-u,6.5u,6u);
path face;
trace 2coinbg--2coinbd--2coinhd--2coinhg--2coinbg;
trace I--J--K--I withcolor blue;
trace M--J--L withcolor blue;
trace L--M dashed evenly withcolor blue;
trace N--L withcolor blue;
trace N--O--L dashed evenly withcolor blue;
trace N--I--P--N withcolor blue;
trace Q--R--P--Q withcolor blue;
trace Q--K--S--Q withcolor blue;
trace S--T--M dashed evenly withcolor blue;
trace S--M withcolor blue;
trace T--R--O--T dashed evenly withcolor blue;
face:=I--J--L--N--cycle;
trace hachurage(face,30,.5,1);
face:=N--I--P--cycle;
trace hachurage(face,60,.4,1);
face:=I--P--Q--K--cycle;
trace hachurage(face,90,.5,1);
face:=I--J--K--cycle;
trace hachurage(face,-30,.5,1);
face:=K--J--M--S--cycle;
trace hachurage(face,90,.2,1);
face:=Q--S--K--cycle;
trace hachurage(face,30,.5,1);
face:=P--R--Q--cycle;
trace hachurage(face,30,.5,1);
fin;
%12
figure(-u,-u,6.5u,6u);
path face;
trace 2coinbg--2coinbd--2coinhd--2coinhg--2coinbg;
trace I--J--K--I withcolor blue;
trace M--J--L withcolor blue;
trace L--M dashed evenly withcolor blue;
trace N--L withcolor blue;
trace N--O--L dashed evenly withcolor blue;
trace N--I--P--N withcolor blue;
trace Q--R--P--Q withcolor blue;
trace Q--K--S--Q withcolor blue;
trace S--T--M dashed evenly withcolor blue;
trace S--M withcolor blue;
trace T--R--O--T dashed evenly withcolor blue;
face:=I--J--L--N--cycle;
fillcolor:=vert;
transparence(face);
face:=N--I--P--cycle;
fillcolor:=jaune;
transparence(face);
face:=I--P--Q--K--cycle;
fillcolor:=bleu;
transparence(face);
face:=I--J--K--cycle;
fillcolor:=rouge;
transparence(face);
face:=K--J--M--S--cycle;
fillcolor:=orange;
transparence(face);
face:=Q--S--K--cycle;
fillcolor:=violet;
transparence(face);
face:=P--R--Q--cycle;
fillcolor:=noir;
transparence(face);
fin;
end