%  En préambule,  les  sources metapost.  Si  vous lancez  latex  sur ce  fichier,  il vous  placera
% automatiquement le fichier .mp dans le répertoire courant. 
\begin{filecontents*}{idfausse.mp}
input newcourbes;
%input couleur;
%input geometriesyr16;
%input TEX;

verbatimtex
%&latex
\documentclass{article}
\usepackage[upright]{fourier}
\usepackage{preambule}
\begin{document}
etex
vardef fx(expr t)=
t
enddef;

vardef fy(expr t)=
          t*sin(t)                   % c'est la seule ligne à changer
	enddef;

	
vardef idfausse(expr a,b,A,B,N) =

  pair c[][];
  
for k:=1 upto N :
  
beginfig(k)
  
%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%
repere(0,0,a,b,A,B,1cm,1cm);
r_axes;
%grad_x(1,1,0.4white);
%grad_y(1,1,0.4white);
r_origine;
r_unites;
r_labelxy;

draw f_courbe(fx,fy,a,-0.01,100) withcolor green;
draw f_courbe(fx,fy,0.01,b,100) withcolor green;

for v:=0 upto k :
  c[k][v]:=r_p(a+v*(b-a)/k,fy(a+v*(b-a)/k));
  dotlabel(btex  etex,c[k][v]);
endfor;

save $;
path $;

$=c[k][0]--
for w=1 upto k-1 :
  c[k][w]--
endfor
c[k][k];

draw $ withcolor red withpen pencircle scaled 1.2bp;

r_fin;
endfig;

endfor;

enddef;

beginfig(0)
  
%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%
repere(0,0,-10,10,-7.5,8.5,1cm,1cm);
r_axes;
%grad_x(1,1,0.4white);
%grad_y(1,1,0.4white);
r_origine;
r_unites;
r_labelxy;

draw f_courbe(fx,fy,-10,-0.01,100) withcolor green;
draw f_courbe(fx,fy,0.01,10,100) withcolor green;

endfig;


idfausse(-10,10,-7.5,8.5,100);

end
\end{filecontents*}




\documentclass{article}
\usepackage{multido}
\usepackage{graphicx}
\usepackage[height=260mm,width=183mm,a4paper]{geometry}
%\graphicspath{{/home/moi/Figures/figuresTS/}}
\begin{document}
\multido{\i=0+1}{100}{\centering\includegraphics[width=\textwidth]{idfausse.\i}\newpage}
\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
