Fichier besace.mp (figure 1) — Modifié le 12 Avril 2008 à 13 h 16

besace.mp (figure 1)
Source

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

input geometriesyr16;

figure(-4u,2u,10u,10u);
pair O,A,B,P[],Q[],M[],N[];
path cc;
O=u*(3,8);
A-O=u*(4,0);
B=rotation(A,O,-90);
cc=cercles(O,A,B);
marque_p:="plein";
for k=-230 step 10 until 130:
  P[k]=pointarc(cc,k);
  Q[k]=droite(O,B) intersectionpoint perpendiculaire(O,B,P[k]);
  M[k]=demidroite(Q[k],P[k]) intersectionpoint cercles(Q[k],abs(O-P[k]));
  N[k]=symetrie(M[k],Q[k]);
  if xpart(M[k])>xpart(Q[k]):
    M[k]:=N[k];
    N[k]:=symetrie(M[k],Q[k]);
  fi;
endfor;
drawoptions(dashed evenly withcolor gris);
trace cc;
trace polygone(A,O,B);
trace codeperp(A,O,B,5);
trace Codelongueur(A,O,O,B,2);
path besace;
besace=M[-220]
for k=-210 step 10 until 130:
  --M[k]
endfor
for k=-220 step 10 until 130:
  --N[k]
  endfor
--cycle;
drawoptions(withcolor rouge);
trace besace;
drawoptions(withcolor bleu);
trace textpath("\Large Besace",besace,0.45);
drawoptions();
fin;
end