prologues:=2;
input geometriesyr16;
%1
figure(0,0,17u,19u);
trace grille(0.5) withcolor orange;
origine((17,25));
pair A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,inter[],A',B',C',D',A'',B'',C'',D'';
A=pp(0,0);
F=pp(0,-13);
B=pp(-6,0);
C=pp(6,0);
D=pp(-5,-7);
E=symetrie(D,A,F);
H=pp(0,-18);
I=pp(-10,0);
J=symetrie(I,A,F);
K=pp(-12,-1);
L=symetrie(K,A,F);
M=pp(-1,1);
N=symetrie(M,A,F);
O=pp(11,-3);
P=symetrie(O,A,F);
Q=pp(-2.5,0);
R=symetrie(Q,A,F);
V=pp(-4,-1);
U=symetrie(V,A,F);
S=pp(0,3);
T=pp(0,9);
X=pp(-7,-8);
W=symetrie(X,A,F);
A'=pp(2,-13);
A''=symetrie(A',A,F);
B'=pp(4,-15);
B''=symetrie(B',A,F);
C'=pp(1,-11);
C''=symetrie(C',A,F);
D'=pp(1,-10);
D''=symetrie(D',A,F);
inter2=pp(0,-11);
inter3=pp(0,-15);
inter4=pp(0,-14);
path cc[];
cc1=cercles(A,5.5u);
cc2=cercles(B,3.5u);
cc3=cercles(C,3.5u);
cc4=cercles(D,4u);
cc5=cercles(E,4u);
cc6=cercles(F,4.5u);
cc8=cercles(H,3u);
cc11=cercles(K,2u);
cc12=cercles(L,2u);
cc13=cercles(M,5.5u);
cc14=cercles(N,5.5u);
cc15=cercles(O,N);
cc16=cercles(P,M);
cc17=cercles(Q,B);
cc18=cercles(R,C);
cc22=cercles(V,2u);
cc21=cercles(U,2u);
cc23=cercles(W,2u);
cc24=cercles(X,2u);
cc19=cercles(S,u);
cc20=cercles(T,S);
cc50=cercles(R,0.75u);
cc51=cercles(Q,0.75u);
cc40=cercles(A',inter2);
cc41=cercles(A'',inter2);
cc42=cercles(C',inter3);
cc43=cercles(C'',inter3);
cc44=cercles(B',inter4);
cc45=cercles(B'',inter4);
cc46=cercles(D',1.25u);
cc47=cercles(D'',1.25u);
inter1=cc11 intersectionpoint cc2;
cc9=cercles(I,inter1);
cc10=cercles(J,symetrie(inter1,A,F));
picture etape[];
etape1=image(
trace cc1 cutbefore cc3 cutafter (subpath(length cc2/4,length cc2/2) of cc2);
trace cc2 cutbefore cc3 cutafter (subpath(length cc11/4,length cc11/2) of cc11);
trace symetrie(cc2 cutbefore cc3 cutafter (subpath(length cc11/4,length cc11/2) of cc11),A,F);
trace cc11 cutbefore cc4 cutafter (subpath(length cc2/4,length cc2/2) of cc2);
trace symetrie(cc11 cutbefore cc4 cutafter (subpath(length cc2/4,length cc2/2) of cc2),A,F);
trace cc13 cutbefore cc11 cutafter (subpath(length cc4/4,length cc4/2) of cc4);
trace symetrie(cc13 cutbefore cc11 cutafter (subpath(length cc4/4,length cc4/2) of cc4),A,F);
trace cc8 cutbefore cc6 cutafter cc6;
);
etape2=image(
trace etape1;
trace cc4 cutbefore (subpath(length cc22/4,length cc22/2) of cc22) cutafter cc6;
trace symetrie(cc4 cutbefore (subpath(length cc22/4,length cc22/2) of cc22) cutafter cc6,A,F);
trace cc9 cutbefore cc22 cutafter segment(inter1,inter1);
trace symetrie(cc9 cutbefore cc22 cutafter segment(inter1,inter1),A,F);
trace cc6 cutbefore cc24;
trace cc6 cutafter cc23;
trace cc22 cutbefore cc19 cutafter (subpath(0.23*length cc24,0.3*length cc24) of cc24);
trace symetrie(cc22 cutbefore cc19 cutafter (subpath(0.23*length cc24,0.3*length cc24) of cc24),A,F);
trace cc19 cutbefore (subpath(0,length cc22/8) of cc22) cutafter (subpath(3*length cc21/8,length cc21/2) of cc21);
);
etape3=image(
trace etape2;
trace cc15 cutbefore cc21 cutafter (subpath(length cc40/8,length cc40/4) of cc40);
trace symetrie(cc15 cutbefore cc21 cutafter (subpath(length cc40/8,length cc40/4) of cc40),A,F);
trace cc41 cutbefore segment(A,F) cutafter (subpath(length cc43/2,3*length cc43/4) of cc43);
trace symetrie(cc41 cutbefore segment(A,F) cutafter (subpath(length cc43/2,3*length cc43/4) of cc43),A,F);
trace cc43 cutbefore (subpath(3*length cc24/4,length cc24) of cc24) cutafter segment(F,H);
trace symetrie(cc43 cutbefore (subpath(3*length cc24/4,length cc24) of cc24) cutafter segment(F,H),A,F);
trace cc23 cutbefore cc21 cutafter cc42;
trace symetrie(cc23 cutbefore cc21 cutafter cc42,A,F);
);
etape4=image(
trace etape3;
trace cc50;trace cc51;
trace cc47 cutbefore cc45 cutafter cc45;
trace symetrie(cc47 cutbefore cc45 cutafter cc45,A,F);
trace cc45 cutbefore segment(inter4,inter4) cutafter cc41;
trace symetrie(cc45 cutbefore segment(inter4,inter4) cutafter cc41,A,F);
trace cc18 cutbefore cc21 cutafter cc20;
trace symetrie(cc18 cutbefore cc21 cutafter cc20,A,F);
trace cc20 cutbefore (subpath(0,0.2*length cc17) of cc17) cutafter (subpath(0.3*length cc18,length cc18/2) of cc18);
);
trace etape4;
fin;
figure(0,0,17u,19u);
trace etape4;
fin;
end