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

pavearete

input geometriesyr16;
input dlf_tex.mp;

u:=1cm;

numeric xmin,xmax,ymin,ymax;
xmin:=-2u;
xmax:=14u;
ymin:=-u;
ymax:=8u;

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

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

AB:=10;  %dimensions de la face avant

A=(0,0);
B=(AB*u,0);

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;

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;

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;
end