Retour

Source : pliagesegment.mp

Animation flash


pliagesegment.mp
input geometriesyr16;
figureespace(-7u,-6u,4u,2u);
Initialisation(5,10,20,500);
color O,A,B,C,B',C',Z,I,J;
O=(0,0,0);
A=(2,0,0);
B=(0.35,0.5,0);
C=(1.8,0.75,0);
Z=(0,0,1);
B'=ProjectionsurPlan(B,A,O,Z);
C'=ProjectionsurPlan(C,A,O,Z);
J=(0,1,0);
I-J=A-O;
path dtepli,segpli[];
dtepli=segment(A,O);
path cc,cb,ci,cj;
cc=cercles(C',C,C',C,C'+Z);
cb=cercles(B',B,B',B,B'+Z);
ci=cercles(A,I,A,I,A+Z);
cj=cercles(O,J,O,J,O+Z);
cc:=subpath(0,length cc/2) of cc;
cb:=subpath(0,length cb/2) of cb;
ci:=subpath(0,length ci/2) of ci;
cj:=subpath(0,length cj/2) of cj;
path planpli[],plan;
plan=polygone(O,O-J,A+A-I,A);
finespace;
_nfig:=0;
vues=18;
color Mc[],Mb[],Mi[],Mj[];
marque_p:="plein";
for vue=0 upto vues:
  figureespace(-7u,-6u,4u,2u);
  trace feuillet withcolor blanc;
  Initialisation(5,10,20,500);
  Mc[vue]=C'+cosd(180*vue/vues)*(C-C')+sind(180*vue/vues)*(Z-O)*Module(C'-C);
  Mb[vue]=B'+cosd(180*vue/vues)*(B-B')+sind(180*vue/vues)*(Z-O)*Module(B'-B);
  Mi[vue]=A+cosd(180*vue/vues)*(I-A)+sind(180*vue/vues)*(Z-O);
  Mj[vue]=O+cosd(180*vue/vues)*(J-O)+sind(180*vue/vues)*(Z-O);
  segpli[vue]=segment(Mc[vue],Mb[vue]);
  planpli[vue]=polygone(O,Mj[vue],Mi[vue],A);
  transparence plan;
  trace plan;
  fillcolor:=jaune;
  transparence planpli[0];
  trace planpli[vue] dashed evenly;
  fillcolor:=gris;
  trace segpli[0] withpen pencircle scaled 1.5bp;
  trace segpli[vue];
  trace dtepli withpen pencircle scaled2bp withcolor rouge;
  finespace;
endfor;
figureespace(-7u,-6u,4u,2u);
  trace feuillet withcolor blanc;
  Initialisation(5,10,20,500);
  transparence plan;
  trace plan;
  fillcolor:=jaune;
  transparence planpli[0];
  fillcolor:=gris;
  trace segpli[0] withpen pencircle scaled 1.5bp;
  trace segpli[vues];
  trace dtepli withpen pencircle scaled2bp withcolor rouge;
finespace
end