prologues:=2;
input geometriesyr16
%etape1:oreilles
%1
u:=5mm;
figure(0,0,19u,28u);
trace grille(0.25) withcolor orange;
origine((20,20));
pair O,A,B,E,F,I,C,D,G,H,J,M,N,R,S,P,Q;
O=pp(0,0);
I=pp(0,-8);
A=pp(-7,0);
B=symetrie(A,O,I);
E=pp(-9,-0.5);
F=symetrie(E,O,I);
C=pp(-5,-8);
D=symetrie(C,O,I);
G=pp(-8,-3);
H=symetrie(G,O,I);
N=pp(-2,16);
R=pp(1,19);
P=pp(9,14);
Q=pp(15,12);
S=iso(P,Q);
path cc[];
cc1=cercles(A,2u);
cc2=cercles(B,2u);
cc3=cercles(E,2.5u);
cc4=cercles(F,2.5u);
cc5=cercles(C,u);
cc6=cercles(C,1.5u);
cc7=cercles(D,u);
cc8=cercles(D,1.5u);
cc9=cercles(I,6.5u);
cc10=cercles(H,9u);
cc11=cercles(G,9u);
J=symetrie(cc10 intersectionpoint cc11,G,H);
M=cc9 intersectionpoint cc1;
cc12=cercles(J,1.5u);
cc13=cercles(M,N);
cc14=cercles(N,P);
cc15=cercles(S,Q);
cc16=cercles(R,Q);
picture etape[];
etape1=image(
  trace cc1;trace cc2;
  trace cc4 cutbefore (subpath(0,length cc2/2) of cc2) cutafter (subpath(length cc2/2,length cc2) of cc2);
  trace symetrie(cc4 cutbefore (subpath(0,length cc2/2) of cc2) cutafter (subpath(length cc2/2,length cc2) of cc2),O,I);
  );
etape2=image(
  trace etape1;
  trace cc5;trace cc6;
  trace cc7;trace cc8;
  );
etape3=image(
  trace etape2;
%tete
  trace cc5;trace cc6;
  trace cc7;trace cc8;
  trace cc9 cutbefore (subpath(length cc2/4,length cc2/2) of cc2) cutafter (subpath(0,length cc1/4) of cc1);
  trace cc10 cutbefore (subpath(length cc1/2,3*length cc1/4) of cc1) cutafter segment(J,J);
  trace symetrie(cc10 cutbefore (subpath(length cc1/2,3*length cc1/4) of cc1) cutafter segment(J,J),O,I);
  trace cc12 cutbefore cc11 cutafter (subpath(length cc10/2,0.7*length cc10) of cc10);
%corps
  trace cc13 cutbefore cc2 cutafter cc10;
  );
etape4=image(
  trace etape3;
  trace cc14 cutafter (subpath(length cc13/4,length cc13/2) of cc13);
  trace cc14 cutbefore segment(P,P);
  trace arccercle(P,Q,S);
  trace cc16 cutafter (subpath(length cc13/4,length cc13/2) of cc13);
  trace cc16 cutbefore segment(Q,Q);
  );
trace etape4;
fin;
%
figure(0,0,19u,28u);
trace etape4;
fin;
end