Fichier cardioide2.mp (figure 1) — Modifié le 12 Avril 2008 à 22 h 29

cardioide2.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(-5u,-3u,10u,12u);
pair A,O,M[],N[],P[];
A=u*(3,5);
path cc,cd[],dd[];
cc=cercles(A,2.5u);
O=pointarc(cc,50);
for k=51 step 3 until 411:
  M[k]=pointarc(cc,k);
  dd[k]=demidroite(O,M[k]);
  cd[k]=cercles(M[k],5u);
  N[k]=dd[k] intersectionpoint cd[k];
  P[k]=symetrie(N[k],M[k]);
endfor;
drawoptions(dashed evenly withcolor gris);
trace cc;
drawoptions(withcolor rouge);
path cardioide;
cardioide=N51
for k=54 step 3 until 408:
  --N[k]
endfor
for k=51 step 3 until 408:
  --P[k]
endfor
--cycle;
trace cardioide;
drawoptions(withcolor bleu);
trace textpath("\Large Cardioïde",cardioide,0.5);
fin;
end