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

hypocycloide.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,4.5u);
for k=0 step 1 until 3*360:
  I[k]=pointarc(cc,k);
  C[k]=3/7[I[k],O];
  M[k]=rotation(I[k],C[k],-7*k/3);
endfor;
drawoptions(dashed evenly withcolor gris);
trace cc;
drawoptions(withcolor rouge);
path hypocycloide;
hypocycloide=M1
for k=2 upto 3*360:
  --M[k]
endfor
--cycle;
trace hypocycloide;
drawoptions(withcolor bleu);
trace textpath("\Large Hypocycloïde",hypocycloide,0.2);
fin;
end