Sections d’un pavé droit par des plans parallèles à une arête

pavearete

input geometriesyr16;
input dlf_tex.mp;

u:=1cm;

%----------------------------------- Définition du cadre
path cadre;
numeric xmin,xmax,ymin,ymax;
xmin:=-2u;
xmax:=14u;
ymin:=-u;
ymax:=8u;

cadre:=(xmin,ymin)--(xmax,ymin)--(xmax,ymax)--(xmin,ymax)--cycle;


%---------------------------------- Définitions générales utilisées
%                                   sur toutes les figures


pair A,B,C,D,E,F,G,H;
pair V;

numeric AB,AD;
AB:=10;  %dimensions de la face avant
AD:=6;

A=(0,0);
B=(AB*u,0);
C=(AB*u,AD*u);
D=(0,AD*u);

V=(2u,u);  % vecteur pour la perspective

E= A shifted V;
F= B shifted V;
G= C shifted V;
H= D shifted V;

pair I,J;
numeric cr;
cr:=0.4;
I:=cr[C,D];
J:= I shifted V;


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i:=1 upto 10:
beginfig(i)


draw A--B--C--D--cycle;
draw B--F--G--C;
draw G--H--D;

draw A--E--F dashed evenly;
draw H--E dashed evenly;

draw I--J withcolor red withpen pencircle scaled 1.5pt; 

pair K,L;
numeric k;
k:=0.1*i;
L:=k[D,A];
K:=L shifted V;

path section;
section :=I--J--K--L--cycle;
fillcolor:=1.3orange;
transparence section;
draw L--I;
draw J--K--L dashed evenly;

draw cadre withcolor black withpen pencircle scaled 2pt;
clip currentpicture to cadre;

endfig;
endfor


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i:=1 upto 9:
beginfig(i+10)


draw A--B--C--D--cycle;
draw B--F--G--C;
draw G--H--D;

draw A--E--F dashed evenly;
draw H--E dashed evenly;

draw I--J withcolor red withpen pencircle scaled 1.5pt; 

pair K,L;
numeric k;
k:=0.1*i;
L:=k[A,B];
K:=L shifted V;

path section;
section :=I--J--K--L--cycle;
fillcolor:=1.3orange;
transparence section;
draw L--I;
draw J--K--L dashed evenly;

draw cadre withcolor black withpen pencircle scaled 2pt;
clip currentpicture to cadre;

endfig;
endfor


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i:=0 upto 9:
beginfig(i+20)


draw A--B--C--D--cycle;
draw B--F--G--C;
draw G--H--D;

draw A--E--F dashed evenly;
draw H--E dashed evenly;

draw I--J withcolor red withpen pencircle scaled 1.5pt; 

pair K,L;
numeric k;
k:=0.1*i;
L:=k[B,C];
K:=L shifted V;

path section;
section :=I--J--K--L--cycle;
fillcolor:=1.3orange;
transparence section;
draw K--L--I;
draw J--K dashed evenly;

draw cadre withcolor black withpen pencircle scaled 2pt;
clip currentpicture to cadre;

endfig;
endfor



end