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

prologues:=2;

input geometriesyr16;

figure(-5u,-10u,8u,10u);
pair A,O,B,E[],F[],G[],M[],P[];
O=u*(2,0);
A-O=u*(5,0);
B=rotation(O,A,90);
l:=0;
for k=1 step 1 until 180:
  P[k]=pointarc(cercles(O,5u),k);
  if (droite(O,P[k]) intersectiontimes droite(A,B))<>(-1,-1):
    E[k]=droite(O,P[k]) intersectionpoint droite(A,B);
    if (droite(O,A) intersectiontimes perpendiculaire(O,E[k],E[k]))<>(-1,-1):
      F[k]=droite(O,A) intersectionpoint perpendiculaire(O,E[k],E[k]);
      if (droite(A,B) intersectiontimes parallele(O,E[k],F[k]))<>(-1,-1):
	l:=l+1;
	G[k]=droite(A,B) intersectionpoint parallele(O,E[k],F[k]);
	M[l]=droite(O,E[k]) intersectionpoint perpendiculaire(O,E[k],G[k]);
	pointe(M[l]);
      fi;
    fi;
  fi;
endfor;
drawoptions(dashed evenly withcolor gris);
trace droite(O,A);
trace droite(A,B);
trace codeperp(O,A,B,5);
drawoptions(withcolor rouge);
path foliumparaboliquedroit;
foliumparaboliquedroit=M1
for k=2 upto l:
  --M[k]
endfor;
trace foliumparaboliquedroit;
drawoptions(withcolor bleu);
trace textpath("\Large Folium parabolique droit",reverse(foliumparaboliquedroit),0.9);
fin;
end