prologues:=2;
input geometriesyr16
%1
figure(0,0,13u,17u);
trace grille(0.5) withcolor orange;
origine((13,22));
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,A',B',C',D',E',F',G',H',I',J',K',L',M',N',O',P',inter[];
path cc[];
A=pp(0,0);
C=pp(0,1.5);
D=pp(-3,4);
E=symetrie(D,A,C);
F=pp(-9,2.5);
G=symetrie(F,A,C);
H=pp(-8.5,5);
I=symetrie(H,A,C);
J=pp(-7.5,8);
K=symetrie(J,A,C);
L=pp(-3.5,7.5);
M=symetrie(L,A,C);
N=pp(0,-7.5);
O=pp(0,-8.5);
P=pp(10,3);
Q=symetrie(P,A,C);
R=pp(-2,-7);
S=symetrie(R,A,C);
T=pp(3.5,-11);
U=symetrie(T,A,C);
V=pp(-1.5,-5);
W=symetrie(V,A,C);
X=pp(-1,-4.5);
Y=symetrie(X,A,C);
Z=pp(-3.5,-13);
A'=symetrie(Z,A,C);
B'=pp(-8.5,-20);
C'=symetrie(B',A,C);
D'=pp(1.5,-13.5);
E'=symetrie(D',A,C);
F'=pp(6,-15);
G'=symetrie(F',A,C);
H'=pp(2.5,-12.5);
I'=symetrie(H',A,C);
J'=pp(-0.5,-1.5);
K'=symetrie(J',A,C);
L'=pp(0,-1.75);
M'=pp(8,-2.5);
N'=symetrie(M',A,C);
O'=pp(-4,-4.75);
P'=symetrie(O',A,C);
cc1=cercles(A,2.75u);
cc2=cercles(A,5.5u);
cc3=cercles(C,3.5u);
cc8=cercles(H,2.25u);
inter1=cc3 intersectionpoint cc8;
cc4=cercles(D,inter1);
cc5=cercles(E,symetrie(inter1,A,C));
cc6=cercles(F,2u);
cc7=cercles(G,2u);
cc9=cercles(I,2.25u);
cc10=cercles(J,1.25u);
cc11=cercles(K,1.25u);
cc12=cercles(L,2.25u);
cc13=cercles(M,2.25u);
cc14=cercles(N,2u);
cc15=cercles(O,2u);
cc16=cercles(P,5u);
cc17=cercles(Q,5u);
cc18=cercles(R,3u);
cc19=cercles(S,3u);
cc20=cercles(T,4.25u);
cc21=cercles(U,4.25u);
cc22=cercles(V,2.5u);
cc23=cercles(W,2.5u);
cc24=cercles(X,1.75u);
cc25=cercles(Y,1.75u);
cc26=cercles(Z,0.75u);
cc27=cercles(A',0.75u);
cc28=cercles(B',4u);
cc29=cercles(C',4u);
cc30=cercles(D',2u);
cc31=cercles(E',2u);
cc32=cercles(F',1.8u);
cc33=cercles(G',1.8u);
cc34=cercles(H',0.6u);
cc35=cercles(I',0.6u);
cc36=cercles(J',u);
cc37=cercles(K',u);
cc38=cercles(L',1.25u);
inter2=symetrie(cc36 intersectionpoint cc38,J',L');
cc39=cercles(M',inter2);
cc40=cercles(N',symetrie(inter2,A,C));
picture etape[];
etape1=image(
  trace cc11 cutbefore cc13 cutafter cc13;
  trace symetrie(cc11 cutbefore cc13 cutafter cc13,A,C);
  trace cc12 cutbefore cc10 cutafter cc6;
  trace symetrie(cc12 cutbefore cc10 cutafter cc6,A,C);
  trace cc8 cutbefore cc3 cutafter (subpath(3*length cc10/4,length cc10) of cc10);
  trace symetrie(cc8 cutbefore cc3 cutafter (subpath(3*length cc10/4,length cc10) of cc10),A,C);
  trace cc3 cutbefore segment(symetrie(inter1,A,C),symetrie(inter1,A,C)) cutafter segment(inter1,inter1);
  trace cc4 cutbefore segment(inter1,inter1) cutafter (subpath(0,length cc6/4) of cc6);
  trace symetrie(cc4 cutbefore segment(inter1,inter1) cutafter (subpath(0,length cc6/4) of cc6),A,C);
  trace cc7 cutbefore cc3 cutafter cc1;
  trace symetrie(cc7 cutbefore cc3 cutafter cc1,A,C);
);
etape2=image(
  trace etape1;
  trace cc2 cutbefore (subpath(length cc11/4,3*length cc11/4) of cc11) cutafter (subpath(0,length cc10/4) of cc10);
  trace cc2 cutbefore (subpath(length cc12/4,3*length cc12/4) of cc12) cutafter (subpath(length cc20/4,3*length cc20/4) of cc20);
  trace symetrie(cc2 cutbefore (subpath(length cc12/4,3*length cc12/4) of cc12) cutafter (subpath(length cc20/4,3*length cc20/4) of cc20),A,C);
  trace cc17 cutbefore cc19;
  trace symetrie(cc17 cutbefore cc19,A,C);
  trace cc19 cutbefore (subpath(3*length cc17/4,0.9*length cc17) of cc17) cutafter cc14;
  trace symetrie(cc19 cutbefore (subpath(3*length cc17/4,0.9*length cc17) of cc17) cutafter cc14,A,C);
  trace cc14 cutafter demidroite(R,S);
  trace cc14 cutbefore cc19 cutafter (subpath(0.95*length cc18,length cc18) of cc18);
  trace cc15 cutbefore (subpath(length cc14/2,3*length cc14/4) of cc14);
  trace cc15 cutafter (subpath(3*length cc14/4,5*length cc14/4) of cc14);
  trace cc1 cutbefore (subpath(3*length cc6/4,0.95*length cc6) of cc6) cutafter cc17;
  trace symetrie(cc1 cutbefore (subpath(3*length cc6/4,0.95*length cc6) of cc6) cutafter cc17,A,C);
  );
etape3=image(
  trace etape2;
  trace cc20 cutbefore (subpath(3*length cc14/8,length cc14) of cc14) cutafter cc26;
  trace symetrie(cc20 cutbefore (subpath(3*length cc14/8,length cc14) of cc14) cutafter cc26,A,C);
  trace cc26 cutafter cc28;
  trace symetrie(cc26 cutafter cc28,A,C);
  trace cc28 cutbefore (subpath(length cc30/2,0.6*length cc30) of cc30) cutafter (subpath(3*length cc26/4,length cc26) of cc26);
  trace symetrie(cc28 cutbefore (subpath(length cc30/2,0.6*length cc30) of cc30) cutafter (subpath(3*length cc26/4,length cc26) of cc26),A,C);
  trace cc30 cutbefore cc28 cutafter cc31;
  trace symetrie(cc30 cutbefore cc28 cutafter cc31,A,C);
  trace cc22 cutbefore (subpath(length cc1/4,3*length cc1/4) of cc1) cutafter cc20;
  trace symetrie(cc22 cutbefore (subpath(length cc1/4,3*length cc1/4) of cc1) cutafter cc20,A,C);
  );
etape4=image(
  trace etape3;
  trace cc24 cutbefore (subpath(length cc38/4,3*length cc38/4) of cc38) cutafter cc19;
  trace symetrie(cc24 cutbefore (subpath(length cc38/4,3*length cc38/4) of cc38) cutafter cc19,A,C);
  trace cc38 cutbefore (subpath(length cc36/2,length cc36) of cc36) cutafter cc17;
  trace symetrie(cc38 cutbefore (subpath(length cc36/2,length cc36) of cc36) cutafter cc17,A,C);
  trace cc36 cutbefore cc39 cutafter cc17;
  trace symetrie(cc36 cutbefore cc39 cutafter cc17,A,C);
  trace cc39 cutbefore demidroite(A,C) cutafter cc36;
  trace symetrie(cc39 cutbefore demidroite(A,C) cutafter cc36,A,C);
  trace cc35 cutbefore cc33 cutafter cc33;
  trace symetrie(cc35 cutbefore cc33 cutafter cc33,A,C);
  trace cc33 cutbefore demidroite(G',E') cutafter demidroite(G',U);
  trace symetrie(cc33 cutbefore demidroite(G',E') cutafter demidroite(G',U),A,C);
  remplis buildcycle(cc1,cc24,reverse(cc19),subpath(0.8*length cc17,length cc17) of cc17);
  remplis symetrie(buildcycle(cc1,cc24,reverse(cc19),subpath(0.8*length cc17,length cc17) of cc17),A,C);
  remplis cercles(O',0.15u) withcolor blanc;
  remplis cercles(P',0.15u) withcolor blanc;
  );
trace etape4;
fin;
figure(0,0,13u,17u);
trace etape4;
fin;
end