Animations

Nombre dérivé

Animation flash


derivee.mp
%@AUTEUR: Maxime Chupin
%@DATE: 1 avril 2007
 
verbatimtex 
%&latex 
\documentclass{article} 
\usepackage[latin1]{inputenc} 
\begin{document} 
\Large
etex 
 
u:=2cm;
 
for i:=0 upto 59:
    beginfig(i+1);
	% axe
	pickup pencircle scaled 0.6pt;
	drawarrow (-u,0)--(7.3u,0);
	drawarrow (0,-u)--(0,3u);
	path courbe,d,e,tangente;
	courbe :=(0.3*u,-u)..(4u,2.25*u)..(7u,u);
	pair A,B,M,M',A',T;
	pickup pencircle scaled 0.5pt;
	% point A
	M:=(u,0);
	d:=M--(xpart M, 12u);
	A:= d intersectionpoint courbe;
	draw (xpart A,-2)--A dashed evenly;
	draw (-2,ypart A)--A dashed evenly;
	% point courant
	M':=((7-(0.1*i))*u,0);
	e:= M'--(xpart M', 12u);
	B:= e intersectionpoint courbe;
	draw (xpart B,-2)--B dashed evenly;
	draw (-2,ypart B)--B dashed evenly;
	% tracer de la courbe
	pickup pencircle scaled 1pt;
	draw courbe withcolor red;
	% tracer de la tangente
	pickup pencircle scaled 0.8pt;
	tangente := 20[A,B]--20[B,A];
	draw tangente withcolor blue;
	% Point ou sera inscrit le nom de la tangente 
	T:=tangente intersectionpoint (((xpart M')+0.5u,0)--((xpart M')+0.5u,12u));
	% label
	label.lft(btex $f(a)$ etex,(-2,ypart A));
	label.lft(btex $f(b)$ etex,(-2,ypart B));
	label.bot(btex $a$ etex,M);
	label.bot(btex $b$ etex,M');
	dotlabel.ulft(btex $A$ etex,A);
	dotlabel.bot(btex $B$ etex,B);
	label.ulft(btex $(C)$ etex, T);
	label.top(btex $x$ etex,(7.1u,0));
	label.lft(btex $y$ etex,(0,2.8u));
 
	clip currentpicture to (-u,-u)--(7.3u,-u)--(7.3u,3u)--(-u,3u)--cycle;
    endfig;
endfor;
 
for i:=0 upto 5:
    beginfig(61+i);
	pickup pencircle scaled 0.6pt;
	drawarrow (-u,0)--(7.3u,0);
	drawarrow (0,-u)--(0,3u);
	path courbe,d,f,tangente;
	courbe :=(0.3*u,-u)..(4u,2.25*u)..(7u,u);
	pickup pencircle scaled 0.5pt;
	pair A,B,M,M',A';
	M:=(u,0);
	d:=M--(xpart M, 12u);
	A:= d intersectionpoint courbe;
	draw (xpart A,-2)--A dashed evenly;
	draw (-2,ypart A)--A dashed evenly;
	pickup pencircle scaled 1pt;
	draw courbe withcolor red;
	pickup pencircle scaled 0.8pt;
	f := ((xpart M)+5,0)--((xpart M)+5,12u);
	A':= f intersectionpoint courbe;
	tangente := 40[A,A']--40[A',A];
	draw tangente withcolor blue;
 
        dotlabel.ulft(btex $A$ etex,A);
	label.lft(btex $f(a)$ etex,(-2,ypart A));
	label.bot(btex $a$ etex,M);
	label.ulft(btex $(T)$ etex, (1+(0.01*(2**((0.15)*60))))[A,A']);
	label.top(btex $x$ etex,(7.1u,0));
	label.lft(btex $y$ etex,(0,2.8u));
 
	clip currentpicture to (-u,-u)--(7.3u,-u)--(7.3u,3u)--(-u,3u)--cycle;
    endfig;
endfor;
end