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

huit2.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(-8.5u,-8.5u,8.5u,8.5u);
pair O,A,B,P[],Q[],M[];
O=(0,0);
A-O=u*(0,8);
B=3/5[O,A];
path cc,cd;
cc=cercles(O,A);
cd=cercledia(B,O);
for k=0 step 1 until 360:
  P[k]=pointarc(cc,k);
  if abs((droite(P[k],O) intersectionpoint cd)-O)<0.1:
    Q[k]=droite(P[k],O) intersectionpoint reverse(cd);
  else:
    Q[k]=droite(P[k],O) intersectionpoint cd;
  fi;
  M[k]=parallele(O,B,Q[k]) intersectionpoint perpendiculaire(O,B,P[k]);
endfor;
drawoptions(dashed evenly withcolor gris);
trace cc;
trace cd;
drawoptions(withcolor rouge);
path huit;
huit=M0
for k=1 step 1 until 360:
  --M[k]
endfor
--cycle;
trace huit;
drawoptions(withcolor bleu);
trace textpath("\Large Huit",huit,0.6);
fin;
end