Pour plus d'informations : Mathcurve
Contruction d'une kiéroïde.
verbatimtex %&latex \documentclass{minimal} \usepackage[charter]{mathdesign} \usepackage[utf8]{inputenc} \begin{document} etex % l'unité graphique u:=1cm; % paramètres largeurDroite:=12u; % fonction(s) def droite(expr a,b)= 10[a,b]--10[b,a] enddef; def demiedroite(expr a,b)= 0.01[a,b]--10[a,b] enddef; compt:=0; for i=0 step 0.05 until 3.5: beginfig(compt); a:=-3u+i*u; b:=-4u; c:=abs(a-b); % rayon du cercle % les ensembles de construction pair O; O:=(0,0); path supportCercle, supportSegment, cercle,kieroide; supportCercle:=(-largeurDroite,a)--(+largeurDroite,a); supportSegment:=(-largeurDroite,b)--(+largeurDroite,b); cercle:=fullcircle scaled (2*c); pair P,N,M; path demieNO, cercleP; for t:=0 step 0.01 until 1: % le point P parcours la droite supportCercle P:=point t of supportCercle; % cercle centré en P cercleP:=cercle shifted P; % M comme intersection N:=(xpart P,b); demieNO:=demiedroite(N,O); M:=demieNO intersectionpoint cercleP; %on définie la courbe if t=0: kieroide:=M; else: kieroide:=kieroide--M; fi; endfor; % on redéfinit les points pour le tracé d,un configuration particulière P:=point 0.4 of supportCercle; cercleP:=cercle shifted P; % M comme intersection N:=(xpart P,b); demieNO:=demiedroite(N,O); M:=demieNO intersectionpoint cercleP; % on dessine draw supportCercle withcolor blue dashed evenly withpen pencircle scaled 1pt; draw cercleP dashed evenly withcolor (0.7,0.7,0.7) withpen pencircle scaled 1pt; draw supportSegment dashed evenly withcolor (0.7,0.7,0.7) withpen pencircle scaled 1pt; draw N--O withcolor (0.7,0.7,0.7) withpen pencircle scaled 1pt; draw N--P withcolor (0.7,0.7,0.7) withpen pencircle scaled 1pt; draw M--P withcolor (0.7,0.7,0.7) withpen pencircle scaled 1pt; draw kieroide withcolor red withpen pencircle scaled 1pt; % les labels label(btex \itshape La Kiéroïde etex, (5u, u)); dotlabel.bot(btex $P$ etex, P); dotlabel.bot(btex $M$ etex, M); dotlabel.bot(btex $N$ etex, N); dotlabel.bot(btex $O$ etex, O); label.ulft(btex $\mathcal C$ etex, P+(cosd(125)*c,sind(125)*c)); label.bot(btex $\Delta$ etex, (8u,a)); clip currentpicture to (10u,-5u)--(-10u,-5u)--(-10u,5u)--(10u,5u)--cycle; endfig; compt:=compt+1; endfor; end.