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,8u,9u);
pair O,A,B,C,P[],Q[],M[];
O=u*(1,5);
A-O=u*(6,0);
B=2/3[O,A];
C=rotation(A,B,90);
path cc,dd;
cc=cercles(iso(A,O),A);
dd=perpendiculaire(O,A,B);
for k=0 step 1 until 360:
P[k]=pointarc(cc,k);
if k=0:
M[k]=B
else:
M[k]=dd intersectionpoint perpendiculaire(C,B,P[k]);
fi;
Q[k]=droite(O,M[k]) intersectionpoint perpendiculaire(O,A,P[k]);
endfor;
drawoptions(dashed evenly withcolor gris);
trace cc;trace dd;
drawoptions(withcolor rouge);
path quartiquepiriforme;
quartiquepiriforme=Q1
for k=2 upto 360:
--Q[k]
endfor
--cycle;
trace quartiquepiriforme;
drawoptions(withcolor bleu);
trace textpath("\Large Quartique piriforme",reverse(quartiquepiriforme),0.7);
fin;
end