input latexmp;
setupLaTeXMP(class="article",options="12pt",fontencoding="T1",inputencoding="latin1",language="frenchb",packages="fourier,textpathmp");
input textpath;

prologues:=2;

input geometriesyr16;

figure(0,u,10u,9u);
pair O,A,P[],P'[],M[];
O=u*(5,5);
A-O=u*(2.5,1);
path cc;
cc=cercles(O,A);
for k=0 step 1 until 360:
  P[k]=pointarc(cc,k);
  P'[k]=symetrie(P[k],O,rotation(A,O,90));
  M[k]=parallele(O,P[k],P'[k]) intersectionpoint perpendiculaire(O,P[k],P[k]);
endfor;
drawoptions(dashed evenly withcolor gris);
trace cc;
drawoptions(withcolor rouge);
path cornoide;
cornoide=M0
for k=1 upto 360:
  --M[k]
endfor
--cycle;
trace cornoide;
drawoptions(withcolor bleu);
trace textpath("\Large Cornoïde",cornoide,0.6);
fin;
end