prologues := 3;
outputtemplate := "%j/%j-%c.svg";
outputformat := "svg";
verbatimtex
%&latex
\documentclass{article}
\usepackage[charter]{mathdesign}
\usepackage{amsmath}
\begin{document}
etex
path carre,cardioide;
carre = (0,0)--(1,0)--(1,1)--(0,1)--cycle;
vardef proj(expr P,M,N) =
save H; pair H;
H = whatever [M,N];
H - P = whatever * (M - N) rotated 90;
H
enddef;
u:=1.2cm;
a:=3u;
q:=-3;
path pod;
%la deltoïde
picture delt;
delt:=image(
path gcercle,pcercle,rayon,epi;
pair N,O';
for i:=0 upto (180):
O':=((a+(a/q))*cosd(i*2),(a+(a/q))*sind(i*2));
pcercle := fullcircle scaled ((2*a)/q) shifted O';
rayon:= (0,0)--(12*u*cosd((q+1)*i*2),12*u*sind((q+1)*i*2));
rayon := rayon shifted O';
N := rayon intersectionpoint pcercle;
if i=0:
epi := N;
else:
epi := epi--N;
fi;
pickup pencircle scaled 0.8pt;
draw epi;
endfor;
);
for j:=0 upto 180:
beginfig(j);
pair O,P,M,T,H,G,K;
O:=(0,0);
path droite[],gcercle,pcercle,rayon;
pickup pencircle scaled 0.6pt;
%les axes
drawarrow (-1.2*a,0)--(1.2*a,0);
drawarrow (0,-1.2*a)--(0,1.2*a);
%le grand-cercle
gcercle:=fullcircle scaled (2*a);
%le centre du cercle
H:=((a+(a/q))*cosd(j*2),(a+(a/q))*sind(j*2));
%le petit cercle
pcercle := fullcircle scaled ((2*a)/q) shifted H;
%fabrication du point fixe sur le petit cercle (point décrivant la deltoide)
rayon:= (0,0)--(12*u*cosd((q+1)*j*2),12*u*sind((q+1)*j*2));
rayon := rayon shifted H;
T := rayon intersectionpoint pcercle;
%le point de contact entre le petit cercle et le grand
P:= (a*cosd(j*2),a*sind(j*2));
draw delt withcolor blue;
droite1 := 40[P,T]--40[T,P];
draw P--T withcolor green;
droite2 := droite1 rotatedaround (P,90) shifted (T-P);
draw droite2 withcolor green;
droite3:= droite1 shifted (-P);
draw gcercle dashed evenly withcolor blue;
draw pcercle dashed evenly withcolor green;
draw H--T dashed evenly;
%Le point décrivant le trifolium
%test de construction
if (j=0) or (j=60) or (j=120) or (j=180):
M:=O;
else:
M:= droite3 intersectionpoint droite2;
fi;
if j=0:
pod:=M;
else:
pod:=pod--M;
fi;
pickup pencircle scaled 0.7pt;
draw O--M withcolor green;
draw carre scaled 8 rotated (angle(M-T)+90)
shifted M dashed withdots scaled 0.3 withcolor 0.5 white;
draw carre scaled 8 rotated (angle(M-T)+270)
shifted T dashed withdots scaled 0.3 withcolor 0.5 white;
draw pod withpen pencircle scaled 1pt withcolor red;
label.bot(btex $x$ etex , (1.1a,0));
label.rt(btex $y$ etex , (0,1.1a));
label.urt(btex $\rho=\lambda \cos(3t)$ etex,
(0.5a,a));
dotlabel.urt(btex $M$ etex, M);
dotlabel.urt(btex $H$ etex, H);
dotlabel.urt(btex $P$ etex, P);
dotlabel.urt(btex $T$ etex, T);
dotlabel.urt(btex $O$ etex, O);
clip currentpicture to (-1.2*a,-1.2*a)--(1.2*a,-1.2*a)--(1.2*a,1.2*a)--(-1.2*a,1.2*a)--cycle;
endfig;
endfor;
end