Fichier limaconboucle.mp (figure 2) — Modifié le 13 Avril 2008 à 07 h 31

limaconboucle.mp (figure 2)
Source

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

prologues:=2;

input geometriesyr16;

figure(-10u,-10u,10u,10u);
pair O,A,P[],M[];
O=(0,0);
path cc;
cc=cercles(O,5u);
A=pointarc(cercles(O,3u),50);
for k=0 step 1 until 360:
  P[k]=pointarc(cc,k);
  M[k]=projection(A,P[k],rotation(O,P[k],90));
endfor;
drawoptions(dashed evenly withcolor gris);
trace cc;
drawoptions(withcolor rouge);
path limacon;
limacon=M0
for k=1 upto 360:
  --M[k]
endfor
--cycle;
trace limacon;
drawoptions(withcolor bleu);
trace textpath("\Large Lima\c con",limacon,0.75);
fin;

figure(-10u,-10u,10u,10u);
pair O,B,P[],M[];
O=(0,0);
path cc;
cc=cercles(O,5u);
B=pointarc(cercles(O,7u),-60);
for k=0 step 1 until 360:
  P[k]=pointarc(cc,k);
  M[k]=projection(B,P[k],rotation(O,P[k],90));
  pointe(M[k]);
endfor;
drawoptions(dashed evenly withcolor gris);
trace cc;
drawoptions(withcolor rouge);
path limacon;
limacon=M0
for k=1 upto 360:
  --M[k]
endfor
--cycle;
trace limacon;
drawoptions(withcolor bleu);
trace textpath("\Large Lima\c con",limacon,0.75);
fin;
end