prologues := 3;
outputtemplate := "ang/%j-%c.svg";
outputformat := "svg";
verbatimtex
%&latex
\documentclass{article}
\usepackage{amsmath}
\usepackage[charter]{mathdesign}
\begin{document}
etex
u:=2cm;
a:=2u;
h:=a/4;
path ang;
for i:=19 upto 350:
beginfig(i-19);
pickup pencircle scaled 0.6pt;
drawarrow (0,-2u)--(0,2u);
drawarrow (-3u,0)--(3u,0);
path cercle,hori,rayon,verti,vertin,horip;
pair O,A,P,N,M;
O:=(0,0);
cercle := fullcircle scaled (a) shifted (a/2,0);
hori := 12[(-2u,h),(2u,h)]--12[(2u,h),(-2u,h)];
verti := 12[(0,-2u),(0,2u)]--12[(0,2u),(0,-2u)];
pickup pencircle scaled 0.4pt;
draw cercle dashed evenly withcolor blue;
draw hori dashed evenly;
if i<>180:
P:=(a/2*cosd(i),a/2*sind(i)) shifted (a/2,0);
rayon := 30[O,P]--30[P,O];
N = rayon intersectionpoint hori;
vertin = verti shifted N;
horip = hori shifted P;
M = whatever [N,(xpart N,4u)];
M = whatever [P,(-4u,ypart P)];
if i<180:
if ((xpart P)>(xpart N)):
draw O--P withcolor green dashed evenly;
else :
draw O--N withcolor green dashed evenly;
fi;
else:
draw P--N withcolor green dashed evenly;
fi;
if i=19:
ang:=M;
else:
ang:= ang--M;
fi;
draw N--M withcolor green dashed evenly;
draw P--M withcolor green dashed evenly;
dotlabel.urt(btex $M$ etex, M);
dotlabel.urt(btex $P$ etex, P);
dotlabel.urt(btex $N$ etex, N);
else:
ang:= ang..(0,0);
fi;
pickup pencircle scaled 1pt;
draw ang withcolor red;
dotlabel.llft(btex $O$ etex, O);
label.lft(btex $h$ etex, (0,h/2));
label.top(btex $a$ etex, (a/2,0));
label.top(btex $x$ etex, (2.7u,0));
label.llft(btex $y$ etex, (0,1.7u));
label(btex \itshape L'anguin\'ea etex, (-1.8u,1.3u));
label(btex $y=\dfrac{ahx}{x^2+h^2}$ etex, (1.8u,-1.3u));
label.top(btex $\Delta$ etex, (2.7u,h));
clip currentpicture to (-3u,-2u)--(3u,-2u)--(3u,2u)--(-3u,2u)--cycle;
endfig;
endfor;
end.