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

epicycloide.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,10u,10u);
pair O,A,I[],C[],M[];
O=u*(5,5);
path cc;
cc=cercles(O,2u);
for k=0 step 1 until 3*360:
  I[k]=pointarc(cc,k);
  C[k]=symetrie(3/7[I[k],O],I[k]);
  M[k]=rotation(I[k],C[k],7*k/3);
endfor;
drawoptions(dashed evenly withcolor gris);
trace cc;
drawoptions(withcolor rouge);
path epicycloide;
epicycloide=M0
for k=1 upto 3*360:
  --M[k]
endfor
--cycle;
trace epicycloide;
drawoptions(withcolor bleu);
trace textpath("\Large Epicycloïde",epicycloide,0.6);
fin;
end