Animations

Les courbes de la bielle de Bérard

Animation flash


berard.mp
%@AUTEUR: Maxime Chupin
%@DATE: 13 février 2008
 
verbatimtex
%&latex
\documentclass{minimal}
\usepackage[latin1]{inputenc}
\usepackage[garamond]{mathdesign}
\usepackage{amsmath}
\begin{document}
etex
 
color jaune;
jaune = red+green;
 
% === Pointer les points avec une couleur cerclée de noir.
def pointe(expr p,c) =
     fill fullcircle scaled 3 shifted p withcolor black;
     fill fullcircle scaled 2 shifted p withcolor c;
enddef;
 
u:=1cm;
pair O;
%Point fixe
O:=(0,0);
path ber[], cercle;
%diamètre du cercle
r:=2;
cercle=fullcircle scaled (2*r*u);
%demie longueur du segment
l:=4;
for i:=0 upto 360: 
 beginfig(i);
  pair P,M[],N;
  x:=cosd(i)*r*u;
  y:=sind(i)*r*u;
  P:=(x,y);
  k:=sqrt(l*l-(y/u)*(y/u))*u;
  N:=(x+k,0);
  M1:=2[P,N];
  M2:=2[N,P];
  M3:=0.5[N,P];
  if i=0:
    ber1:=M1;
    ber2:=M2;
    ber3:=M3;
  else:
    ber1:=ber1--M1;
    ber2:=ber2--M2;
    ber3:=ber3--M3;
  fi;
  pickup pencircle scaled 0.8pt;
  draw O--(1.5*l*u,0);
  draw cercle dashed evenly withcolor blue;
  pickup pencircle scaled 1.3pt;
  draw P--N withcolor green;
  draw M1--M2 withcolor green;
  draw O--P withcolor green;
  pickup pencircle scaled 0.8pt;
  pointe(O,jaune);
  pointe(P,jaune);
  pointe(N,jaune);
  drawoptions(withpen pencircle scaled 1pt withcolor red);
  draw ber1;
  draw ber2;
  draw ber3;
  drawoptions();
  pointe(M1,jaune);
  pointe(M2,jaune)
  pointe(M3,jaune);
  label.top(btex 
    \textit{Courbes de la bielle de } \textsc{Bérard} 
    etex scaled 1.5, (2.5*r*u,2*r*u));
  draw (-7u,-5u)--(10.5u,-5u)--(10.5u,5u)--(-7u,5u)--cycle
    withcolor 0.7white;
 
 endfig;
endfor;
end.