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

prologues:=2;

input geometriesyr16;

figure(0,0,15u,10.5u);
pair O,A,B,C,N[],P[],Q[],M[];
O=u*(4,5);
A-O=u*(6,0);
B-O=u*(0,4);
C-B=A-O;
path ac,bc;
ac=droite(A,C);
bc=droite(B,C);
l=0;
for k=-15 upto -1:
  N[k]=(k/10)[A,C];
  P[k]=perpendiculaire(O,N[k],N[k]) intersectionpoint bc;
  Q[k]=perpendiculaire(N[k],P[k],P[k]) intersectionpoint ac;
  l:=l+1;
  M[l]=perpendiculaire(Q[k],P[k],Q[k]) intersectionpoint droite(O,N[k]);
endfor;
for k=1 upto 9:
  N[k]=(k/10)[A,C];
  P[k]=perpendiculaire(O,N[k],N[k]) intersectionpoint bc;
  Q[k]=perpendiculaire(N[k],P[k],P[k]) intersectionpoint ac;
  l:=l+1;
  M[l]=perpendiculaire(Q[k],P[k],Q[k]) intersectionpoint droite(O,N[k]);
endfor;
for k=11 upto 26:
  N[k]=(k/10)[A,C];
  P[k]=perpendiculaire(O,N[k],N[k]) intersectionpoint bc;
  Q[k]=perpendiculaire(N[k],P[k],P[k]) intersectionpoint ac;
  l:=l+1;
  M[l]=perpendiculaire(Q[k],P[k],Q[k]) intersectionpoint droite(O,N[k]);
endfor;
drawoptions(dashed evenly withcolor gris);
trace polygone(O,A,C,B);
trace droite(B,C);
trace droite(A,C);
drawoptions(withcolor rouge);
path foliumparabolique;
foliumparabolique=M1
for k=2 upto l:
  --M[k]
endfor;
trace foliumparabolique;
drawoptions(withcolor bleu);
trace textpath("\Large Folium parabolique",reverse(foliumparabolique),0.5);
fin;
end