Fichier limacondepascal.mp (figure 1) — Modifié le 13 Avril 2008 à 13 h 13

limacondepascal.mp (figure 1)
Source

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,9.5u,10u);
pair O,A,B,P[],M[],M'[];
O=u*(1,5);
A-O=u*(6,0);
B=2/3[O,A];
path cc,dd[];
cc=cercles(iso(O,A),A);
for k=-180 upto 180:
  P[k]=pointarc(cc,k);
  if (k=-180) or (k=180):
    dd[k]=perpendiculaire(O,A,O)
  else:
    dd[k]=demidroite(P[k],O);
  fi;
  M[k]=dd[k] intersectionpoint cercles(P[k],abs(A-B));
  M'[k]=symetrie(M[k],P[k]);
endfor;
drawoptions(dashed evenly withcolor gris);
trace cc;
drawoptions(withcolor rouge);
path limacon;
limacon=M[-180]
for k=-179 upto 179:
  --M[k]
endfor
--M'[-180]
for k=-179 upto 179:
  --M'[k]
endfor
--cycle;
trace limacon;
drawoptions(withcolor bleu);
trace textpath("\Large Lima\c con de Pascal",limacon,0.75);
fin;
end