Retour

Source : carre.mp

Animation flash


carre.mp
prologues:=2;
 
verbatimtex
%&latex
\documentclass{article}
\usepackage[french]{babel}
\begin{document}
etex
 
input geometriesyr16;
input outilssyr;
picture depart;
depart=image(
  figuremainlevee(0,0,11u,8u);
  trace feuillet withcolor blanc;
  pair E,F,G,H;
  E=u*(2,5);
  G-E=u*(1.5,1);
  F=rotation(G,E,90);
  H-G=F-E;
  trace polygone(E,F,H,G);
  trace codeperp(F,E,G,5);
  trace codeperp(E,G,H,5);
  trace codeperp(E,F,H,5);
  trace codeperp(F,H,G,5);
  trace appelation(E,G,-2mm,btex 3~cm etex);
  trace codesegments(E,G,F,H,1);
  trace codesegments(E,F,G,H,1);
  finmainlevee;
  );
_nfig:=0;
 
figure(0,0,11u,8u);
trace depart;
pair O,A,B,C,D;
O=u*(4,2);
A=u*(6,2);
B-A=u*(3,0);
C-A=u*(0,3);
D-B=C-A;
marque_p:="croix";
nomme.llft(A);
fin;
vues:=4;
for k=0 upto vues:
  figure(0,0,11u,8u);
  trace depart;
  nomme.llft(A);
  trace regle(A,2[A,B],1);
  trace crayon(A,B,k/vues,1.5);
  trace segment(A,(k/vues)[A,B]) withpen pencircle scaled 1.5bp;
  fin;
endfor;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
trace segment(A,B) withpen pencircle scaled 1.5bp;
fin;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
trace segment(A,B) withpen pencircle scaled 1.5bp;
trace crayon(A,B,1,1.5);
fin;
 
%on trace la perpendiculaire en A!
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
trace segment(A,B) withpen pencircle scaled 1.5bp;
trace regle(O,B,1);
trace equerre(A,B,A,1,2.5);
fin;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
trace segment(A,B) withpen pencircle scaled 1.5bp;
trace equerre(A,B,A,1,2.5);
fin;
 
for k=0 upto vues:
  figure(0,0,11u,8u);
  trace depart;
  nomme.llft(A);
  nomme.lrt(B);
  trace segment(A,B) withpen pencircle scaled 1.5bp;
  trace equerre(A,B,A,1,2.5);
  trace crayon(A,1.5[A,C],k/vues,1.5);
  trace segment(A,(1.5*k/vues)[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
  fin;
endfor;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
trace segment(A,B) withpen pencircle scaled 1.5bp;
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
fin;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
trace segment(A,B) withpen pencircle scaled 1.5bp;
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
path angledroit;
angledroit=codeperp(C,A,B,10);
trace crayon(A,point(0) of angledroit,1,1.5);
fin;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
trace segment(A,B) withpen pencircle scaled 1.5bp;
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
trace subpath(0,1) of angledroit;
trace crayon(point(0) of angledroit,point(1) of angledroit,1,1.5);
fin;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
trace segment(A,B) withpen pencircle scaled 1.5bp;
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
trace angledroit;
trace crayon(point(1) of angledroit,point(2) of angledroit,1,1.5);
fin;
 
  for k=0 upto vues:
figure(0,0,11u,8u);
trace depart;
  nomme.llft(A);
  nomme.lrt(B);
  trace regle(A,C,1);
  trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
  trace segment(A,B) withpen pencircle scaled 1.5bp;
  trace segment(A,(k/vues)[A,C]) withpen pencircle scaled 1.5bp;
  trace angledroit;
  trace crayon(A,C,k/vues,1.5);
  fin;
endfor;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
trace crayon(A,C,1,1.5);
nomme.ulft(C);
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
trace chemin(C,A,B) withpen pencircle scaled 1.5bp;
trace angledroit;
fin;
%fin de la perpendiculaire en A!
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
nomme.ulft(C);
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
trace chemin(C,A,B) withpen pencircle scaled 1.5bp;
trace regle(A,2[A,B],1);
trace equerre(A,B,B,1,2.5);
trace angledroit;
fin;
 
for k=0 upto vues:
  figure(0,0,11u,8u);
  trace depart;
  nomme.llft(A);
  nomme.lrt(B);
  nomme.ulft(C);
  trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
  trace chemin(C,A,B) withpen pencircle scaled 1.5bp;
  trace equerre(A,B,B,1,2.5);
  trace crayon(B,1.5[B,D],k/vues,1.5);
  trace segment(B,(1.5*k/vues)[B,D]) withpen pencircle scaled 1.5bp withcolor gris;
  trace angledroit;
  fin;
endfor;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
nomme.ulft(C);
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
trace segment(B,1.5[B,D]) withpen pencircle scaled 1.5bp withcolor gris;
trace chemin(C,A,B) withpen pencircle scaled 1.5bp;
trace angledroit;
fin;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
nomme.ulft(C);
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
trace segment(B,1.5[B,D]) withpen pencircle scaled 1.5bp withcolor gris;
trace chemin(C,A,B) withpen pencircle scaled 1.5bp;
trace angledroit;
path angledroite;
angledroite=codeperp(D,B,A,10);
trace crayon(B,point(0) of angledroite,1,1.5);
fin;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
nomme.ulft(C);
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
trace segment(B,1.5[B,D]) withpen pencircle scaled 1.5bp withcolor gris;
trace chemin(C,A,B) withpen pencircle scaled 1.5bp;
trace angledroit;
trace subpath(0,1) of angledroite;
trace crayon(point(0) of angledroite,point(1) of angledroite,1,1.5);
fin;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
nomme.ulft(C);
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
trace segment(B,1.5[B,D]) withpen pencircle scaled 1.5bp withcolor gris;
trace chemin(C,A,B) withpen pencircle scaled 1.5bp;
trace angledroit;
trace angledroite;
trace crayon(point(1) of angledroite,point(2) of angledroite,1,1.5);
fin;
 
  for k=1 upto vues:
figure(0,0,11u,8u);
  trace depart;
  nomme.llft(A);
  nomme.lrt(B);
  nomme.ulft(C);
  trace regle(B,D,1);
  trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
  trace segment(B,1.5[B,D]) withpen pencircle scaled 1.5bp withcolor gris;
  trace chemin(C,A,B) withpen pencircle scaled 1.5bp;
  trace segment(B,(k/vues)[B,D]) withpen pencircle scaled 1.5bp;
  trace angledroit;
  trace angledroite;
  trace crayon(B,(k/vues)[B,D],1,1.5);
  fin;
endfor;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
nomme.ulft(C);
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
trace segment(B,1.5[B,D]) withpen pencircle scaled 1.5bp withcolor gris;
trace chemin(C,A,B,D) withpen pencircle scaled 1.5bp;
trace angledroit;
trace angledroite;
fin;
 
%fin de la perpendiculaire en B!
 
for k=0 upto vues:
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
nomme.ulft(C);
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
trace segment(B,1.5[B,D]) withpen pencircle scaled 1.5bp withcolor gris;
trace chemin(C,A,B,D) withpen pencircle scaled 1.5bp;
trace angledroit;
trace angledroite;
trace regle(C,3[C,D],1);
  trace crayon(C,D,k/vues,1.5);
  trace segment(C,(k/vues)[C,D]) withpen pencircle scaled 1.5bp;
  fin;
endfor;
 
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
nomme.ulft(C);
nomme.urt(D);
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
trace segment(B,1.5[B,D]) withpen pencircle scaled 1.5bp withcolor gris;
trace polygone(A,B,D,C) withpen pencircle scaled 1.5bp;
trace angledroit;
trace angledroite;
trace codeperp(A,C,D,10);
trace codeperp(C,D,B,10);
fin;
for k=0 upto 2:
figure(0,0,11u,8u);
trace depart;
nomme.llft(A);
nomme.lrt(B);
nomme.ulft(C);
nomme.urt(D);
trace segment(A,1.5[A,C]) withpen pencircle scaled 1.5bp withcolor gris;
trace segment(B,1.5[B,D]) withpen pencircle scaled 1.5bp withcolor gris;
trace polygone(A,B,D,C) withpen pencircle scaled 1.5bp;
trace angledroit;
trace angledroite;
trace codeperp(A,C,D,10);
trace codeperp(C,D,B,10);
trace Codelongueur(A,B,B,D,D,C,C,A,1);
fin;
endfor;
end