Fichier scyphoide.mp (figure 1) — Modifié le 13 Avril 2008 à 13 h 13
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 A,O,B,C[],P[],M[],N[];
A=u*(2,5);
O-A=u*(3,0);
B=rotation(A,O,90);
path cc,dd;
cc=cercles(O,A);
dd=perpendiculaire(O,A,O);
marque_p:="plein";
l=0;
for k=-179 step 1 until 179:
C[k]=pointarc(cc,k);
if (droite(A,C[k]) intersectiontimes dd)<>(-1,-1):
P[k]=droite(A,C[k]) intersectionpoint dd;
l:=l+1;
M[l]=cercles(P[k],O) intersectionpoint perpendiculaire(A,P[k],P[k]);
N[l]=symetrie(M[l],P[k]);
fi;
endfor;
drawoptions(withcolor rouge);
path scyphoide[];
scyphoide1=M1
for k=2 upto l:
--M[k]
endfor;
scyphoide2=N1
for k=2 upto l:
--N[k]
endfor;
trace scyphoide1;
trace scyphoide2;
drawoptions(withcolor bleu);
trace textpath("\Large Scyphoïde",scyphoide2,0.6);
fin;
end