prologues := 3;
outputtemplate := "%j/%j-%c.svg";
outputformat := "svg";
verbatimtex
%&latex
\documentclass{minimal}
\usepackage[charter]{mathdesign}
\usepackage[utf8]{inputenc}
\begin{document}
etex
% l'unité graphique
u:=.7cm;
% paramètres
a:=-2u;
b:=-4u;
c:=abs(a-b); % rayon du cercle
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;
% 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);
% les constructions mouventes
pair P,N,M;
path demieNO, cercleP;
for t:=0 step 0.005 until 1:
i:=round(t*200);
beginfig(i);
% 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 i=0:
kieroide:=M;
else:
kieroide:=kieroide--M;
fi;
% on dessine
draw supportCercle withcolor green 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 blue withpen pencircle scaled 1pt;
draw N--P withcolor blue withpen pencircle scaled 1pt;
draw M--P withcolor blue withpen pencircle scaled 1pt;
draw kieroide withcolor red withpen pencircle scaled 1pt;
% les labels
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));
label(btex \itshape La Kiéroïde etex, (5u, u));
clip currentpicture to (10u,-5u)--(-10u,-5u)--(-10u,2u)--(10u,2u)--cycle;
endfig;
endfor;
end.