Retour

Source : compotranslations.mp

Animation flash


compotranslations.mp
input geometriesyr16;
vues=8;
pair A,B,C,R,S,T;
A=u*(1,6);
B=u*(5,5);
C=u*(7,7);
R=u*(0.5,2);
S=u*(5,3);
T=u*(2,4);
path cc;
cc=triangle(R,S,T);
picture piece,fond;
fond=image(
  marque_p:="croix";
  nomme.llft(A);
  nomme.top(B);
  nomme.lrt(C);
  marque_p:="non";
  drawarrow A--B withpen pencircle scaled 1.5bp;
  drawarrow B--C withpen pencircle scaled 1.5bp;
  );
piece=image(
  fill cc withcolor jaune;
  trace cc;
  );
figure(0,0,12u,8u);
draw feuillet withcolor blanc;
draw fond;
draw piece;
fin;
for vue=1 upto vues:
  figure(0,0,12u,8u);
  draw feuillet withcolor blanc;
  draw piece;
  draw fond;
  draw piece shifted((vue/vues)*(B-A));
  trace R--(R shifted((vue/vues)*(B-A))) dashed evenly;
  trace S--(S shifted((vue/vues)*(B-A))) dashed evenly;
  drawarrow T--(T shifted((vue/vues)*(B-A)));
  fin;
endfor;
figure(0,0,12u,8u);
draw feuillet withcolor blanc;
draw piece;
draw fond;
draw piece shifted(B-A);
drawarrow T--(T shifted(B-A));
fin;
for vue=1 upto vues:
  figure(0,0,12u,8u);
  draw feuillet withcolor blanc;
  draw piece;
  fill (cc shifted(B-A)) withcolor(vue/vues)[jaune,white];
  draw fond;
  draw (piece shifted(B-A)) shifted((vue/vues)*(C-B));
  trace (R shifted(B-A))--((R shifted(B-A)) shifted((vue/vues)*(C-B))) dashed evenly;
  trace (S shifted(B-A))--((S shifted(B-A)) shifted((vue/vues)*(C-B))) dashed evenly;
  drawarrow T--(T shifted(B-A));
  drawarrow (T shifted(B-A))--((T shifted(B-A)) shifted((vue/vues)*(C-B)));
  fin;
endfor;
figure(0,0,12u,8u);
draw feuillet withcolor blanc;
draw piece;
draw fond;
draw piece shifted(C-A);
drawarrow T--(T shifted(B-A));
drawarrow (T shifted(B-A))--(T shifted(C-A));
fin;
figure(0,0,12u,8u);
draw feuillet withcolor blanc;
draw piece;
draw fond;
draw piece shifted(C-A);
drawarrow T--(T shifted(B-A));
drawarrow (T shifted(B-A))--(T shifted(C-A));
drawarrow A--C withpen pencircle scaled2bp withcolor violet;
fin;
for vue=1 upto vues:
  figure(0,0,12u,8u);
  draw feuillet withcolor blanc;
  draw piece;
  draw fond;
  draw piece shifted(C-A);
  drawarrow T--(T shifted(B-A));
  drawarrow (T shifted(B-A))--(T shifted(C-A));
  drawarrow A--C withpen pencircle scaled2bp withcolor violet;
  draw piece shifted((vue/vues)*(C-A));
  drawarrow T--(T shifted((vue/vues)*(C-A)));
  fin;
endfor;
end