Retour

Source : cube.mp


cube.mp
%%[slideshow]
\input slideshow;
author("Christophe Poulain & Régis Leclercq");
title("Construction de la parallèle à une droite passant par un point");
%%[navigation]
\input navigation;
couleurboutons:=(1,1,0.3);
couleurfond:=(0,0,0.7);
%% Choix de LaTeX
verbatimtex
%&latex
\documentclass[a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[frenchb]{babel}
\begin{document}
etex
%%[geometrie]
input geometrie2;
%%[Image]
picture cp;
cp=thelabel(btex \sf C.POULAIN -- 2002 etex scaled 0.5,(0.90lawidth,0.03laheight));
footer(image(draw cp withcolor blue;));
%% -- navigation PDF & logos
def navPDFlogos =
 init_navigation;
 navigation;
 internavigation;
enddef;
extra_endfig := extra_endfig & "navPDFlogos;";
% gs will need this
prologues:=2;
%fond d'écran
noslides := 11;
def doback =
background := image(drawgradient((charcode/noslides)[white,white], (charcode/noslides)[white,white]););
enddef;
doback;
%%cadre
path cadre;
cadre=(0.05lawidth,0.9laheight)--(0.95lawidth,0.9laheight)--(0.95lawidth,0.98laheight)--(0.05lawidth,0.98laheight)--cycle;
draw cadre;
%% -- instructions
color C[];
C6=0.8white;
vardef instruction(expr s) =
  fill cadre withcolor C6;
  label.rt(s,p100);
enddef;
%[Points]
pair c[],largeur,hauteur,p[],i[],q[],r[];
c0=(0.578125lawidth,0.5laheight);
largeur=(0.15625lawidth,0);
hauteur=(0,0.20833laheight);%5/24
c1=c0 shifted hauteur;
c2=c0 shifted (hauteur-largeur);
c3=c0 shifted (-largeur);
c4=c0 shifted ((3/5)*(-hauteur-largeur));
c5=c4 shifted hauteur;
c6=c4 shifted (hauteur-largeur);
c7=c4 shifted (-largeur);
c8=(c0--c3) intersectionpoint (c4--c5);
c9=(c2--c3) intersectionpoint (c6--c5);
p4=c0 shifted largeur;
p5=c1 shifted largeur;
p6=c2 shifted (-largeur);
p7=c3 shifted (-largeur);
p0=c0 shifted (-2*hauteur);
p3=c3 shifted (-2*hauteur);
q5=c1 shifted hauteur;
q6=c2 shifted hauteur;
r5=c4 shifted ((3/5)*(-largeur-hauteur));
r6=c7 shifted ((3/5)*(-largeur-hauteur));
vues=5;
path fleche[];
fleche1=c5{dir0}..p5{dir90};
fleche2=c5{dir90}..q5{dir0};
fleche3=c5{dir180}..r5{dir-90};
fleche4=c7{dir180}..p7{dir90};
fleche5=r5{dir-90}..p0{dir0};
nextfig;
draw c5--c6--c7--c4--cycle;
draw c0--c1--c5--c4--cycle;
draw c1--c2--c6;
draw c2--c3--c0 dashed evenly;
draw c3--c7 dashed evenly;
endfig;
for vue=0 upto vues :
  nextfig;
  if vue=0 :
    draw c5--c6--c7--c4--cycle;
    draw c0--c1--c5--c4--cycle;
    draw c1--c2--c6;
    draw c2--c3--c0 dashed evenly;
    draw c3--c7 dashed evenly;
    drawarrow subpath(0,vue*(length fleche1)/vues) of fleche1 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    drawarrow subpath(0,vue*(length fleche1)/vues) of fleche1 shifted (-hauteur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    draw c0--c1--(point(vue*(length fleche1)/vues) of fleche1)--(point(vue*(length fleche1)/vues) of fleche1 shifted (-hauteur))--cycle withcolor red;
  fi    
  if vue=1 :
    i1=(c3--c0) intersectionpoint ((point(vue*(length fleche1)/vues) of fleche1)--(point(vue*(length fleche1)/vues) of fleche1 shifted (-hauteur)));
    draw c2--c3--c8 dashed evenly;
    draw c8--i1;
    draw i1--c0 dashed evenly;    
    draw c5--c6--c7--c4--cycle;
    draw c0--c1--c5--c4--cycle;
    draw c1--c2--c6;
    draw c2--c3--c0 dashed evenly;
    draw c3--c7 dashed evenly;
    drawarrow subpath(0,vue*(length fleche1)/vues) of fleche1 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    drawarrow subpath(0,vue*(length fleche1)/vues) of fleche1 shifted (-hauteur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    draw c0--c1--(point(vue*(length fleche1)/vues) of fleche1)--(point(vue*(length fleche1)/vues) of fleche1 shifted (-hauteur))--cycle withcolor red;
  fi
  if vue>1 :
    draw c5--c6--c7--c4--cycle;
    draw c0--c1--c5--c4--cycle;
    draw c1--c2--c6;
    draw c8--c0;
    draw c2--c3--c8 dashed evenly;
    draw c3--c7 dashed evenly;
    drawarrow subpath(0,vue*(length fleche1)/vues) of fleche1 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    drawarrow subpath(0,vue*(length fleche1)/vues) of fleche1 shifted (-hauteur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    draw c0--c1--(point(vue*(length fleche1)/vues) of fleche1)--(point(vue*(length fleche1)/vues) of fleche1 shifted (-hauteur))--cycle withcolor red;
  fi
endfig;
discontinue;
endfor
nextfig;
draw p4--p5--c2--c6--c7--c4--c0--cycle;
draw c6--c5--c1--c0;
draw c5--c4;
draw c2--c3--c7 dashed evenly;
draw c3--c8 dashed evenly;
draw c8--c0;
endfig;
for vue=0 upto vues :
  nextfig;
  if vue=0 :
    draw p4--p5--c2--c6--c7--c4--c0--cycle;
    draw c6--c5--c4;
    draw c1--c0;
    draw c2--c3--c7 dashed evenly;
    draw c3--c8 dashed evenly;
    draw c8--c0;
    drawarrow subpath(0,vue*(length fleche2)/vues) of fleche2 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    drawarrow subpath(0,vue*(length fleche2)/vues) of fleche2 shifted (-largeur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    draw c1--c2--(point(vue*(length fleche2)/vues) of fleche2 shifted (-largeur))--(point(vue*(length fleche2)/vues) of fleche2)--cycle withcolor red;
  fi
  if vue=1 :
    i2=(c3--c2) intersectionpoint ((point(vue*(length fleche2)/vues) of fleche2)--(point(vue*(length fleche2)/vues) of fleche2 shifted (-largeur)));
    i3=(c6--c2) intersectionpoint ((point(vue*(length fleche2)/vues) of fleche2)--(point(vue*(length fleche2)/vues) of fleche2 shifted (-largeur)));
    draw c0--p4--p5--c1--c0--c4--c5--c6--c7--c4;
    draw c2--i3 dashed evenly;
    draw i3--c6;
    draw c6--c5--c4;
    draw c1--c0;
    draw c2--i2 dashed evenly;
    draw i2--c9;
    draw c9--c3--c7 dashed evenly;    
    draw c3--c8 dashed evenly;
    draw c8--c0;
    drawarrow subpath(0,vue*(length fleche2)/vues) of fleche2 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    drawarrow subpath(0,vue*(length fleche2)/vues) of fleche2 shifted (-largeur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    draw c1--c2--(point(vue*(length fleche2)/vues) of fleche2 shifted (-largeur))--(point(vue*(length fleche2)/vues) of fleche2)--cycle withcolor red;
  fi
  if vue>1 :
    draw c0--p4--p5--c1--c0--c4--c5--c6--c7--c4;
    draw c2--c6--c5--c4;
    draw c1--c0;
    draw c2--c9;
    draw c9--c3--c7 dashed evenly;    
    draw c3--c8 dashed evenly;
    draw c8--c0;
    drawarrow subpath(0,vue*(length fleche2)/vues) of fleche2 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    drawarrow subpath(0,vue*(length fleche2)/vues) of fleche2 shifted (-largeur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    draw c1--c2--(point(vue*(length fleche2)/vues) of fleche2 shifted (-largeur))--(point(vue*(length fleche2)/vues) of fleche2)--cycle withcolor red;
  fi
endfig;
discontinue;
endfor
nextfig;
draw c0--p4--p5--c1--c0--c4--c5--c6--c7--c4;
draw c2--c6--c5--c4;
draw c1--c0;
draw c2--c9;
draw c9--c3--c7 dashed evenly;
draw c3--c8 dashed evenly;
draw c8--c0;
draw c1--c2--point(length fleche2) of fleche2 shifted (-largeur)--point(length fleche2) of fleche2--cycle;
endfig;
for vue=0 upto vues :
  nextfig;
  if vue=0 :
    draw c0--p4--p5--c1--c0--c4--c5--c6--c7--c4;
    draw c2--c6--c5--c4;
    draw c1--c0;
    draw c2--c9;
    draw c9--c3--c7 dashed evenly;
    draw c3--c8 dashed evenly;
    draw c8--c0;
    draw c1--c2--point(length fleche2) of fleche2 shifted (-largeur)--point(length fleche2) of fleche2--cycle;
    drawarrow subpath(0,vue*(length fleche3)/vues) of fleche3 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    drawarrow subpath(0,vue*(length fleche3)/vues) of fleche3 shifted (-largeur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    draw c4--c7--(point(vue*(length fleche3)/vues) of fleche3 shifted (-largeur))--(point(vue*(length fleche3)/vues) of fleche3)--cycle withcolor red;
  fi
  if vue=1 :
    draw c6--c2--q6--q5--c1--p5--p4--c0--c4;
    draw c2--c1--c0;
    draw c2--c9;
    i4=((point(vue*(length fleche3)/vues) of fleche3 shifted (-largeur))--(point(vue*(length fleche3)/vues) of fleche3)) intersectionpoint (c2--c3);
    draw c2--i4;
    draw i4--c3 dashed evenly;
    i5=((point(vue*(length fleche3)/vues) of fleche3 shifted (-largeur))--(point(vue*(length fleche3)/vues) of fleche3)) intersectionpoint (c6--c7);
    draw c6--i5;
    draw i5--c7 dashed evenly;
    i6=(c4--(point(vue*(length fleche3)/vues) of fleche3)) intersectionpoint (c3--c0);
    draw c9--c3--c7 dashed evenly;
    draw c3--i6 dashed evenly;
    draw i6--c0;
    drawarrow subpath(0,vue*(length fleche3)/vues) of fleche3 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    drawarrow subpath(0,vue*(length fleche3)/vues) of fleche3 shifted (-largeur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    draw c4--c7--(point(vue*(length fleche3)/vues) of fleche3 shifted (-largeur))--(point(vue*(length fleche3)/vues) of fleche3)--cycle withcolor red;
  fi
  if vue=2 :
    draw c6--c2--q6--q5--c1--p5--p4--c0--c4;
    draw c2--c1--c0;
    draw c2--c9;
    draw c2--c3;
    i7=((point(vue*(length fleche3)/vues) of fleche3 shifted (-largeur))--(point(vue*(length fleche3)/vues) of fleche3)) intersectionpoint (c6--c7);
    draw c6--i7;
    draw i7--c7 dashed evenly;
    draw c3--c0;
    i8=(c4--(point(vue*(length fleche3)/vues) of fleche3)) intersectionpoint (c3--c7);
    draw i8--c7 dashed evenly;
    draw c3--i8;
    drawarrow subpath(0,vue*(length fleche3)/vues) of fleche3 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    drawarrow subpath(0,vue*(length fleche3)/vues) of fleche3 shifted (-largeur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    draw c4--c7--(point(vue*(length fleche3)/vues) of fleche3 shifted (-largeur))--(point(vue*(length fleche3)/vues) of fleche3)--cycle withcolor red;
  fi
  if vue=3 :
    draw c6--c2--q6--q5--c1--p5--p4--c0--c4;
    draw c2--c1--c0;
    draw c2--c9;
    draw c2--c3;
    i9=((point(vue*(length fleche3)/vues) of fleche3 shifted (-largeur))--(point(vue*(length fleche3)/vues) of fleche3)) intersectionpoint (c6--c7);
    draw c6--i9;
    draw i9--c7 dashed evenly;
    draw c3--c0;
    i10=((point(vue*(length fleche3)/vues) of fleche3 shifted (-largeur))--(point(vue*(length fleche3)/vues) of fleche3)) intersectionpoint (c3--c7);
    draw i10--c7 dashed evenly;
    draw c3--i10;
    drawarrow subpath(0,vue*(length fleche3)/vues) of fleche3 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    drawarrow subpath(0,vue*(length fleche3)/vues) of fleche3 shifted (-largeur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    draw c4--c7--(point(vue*(length fleche3)/vues) of fleche3 shifted (-largeur))--(point(vue*(length fleche3)/vues) of fleche3)--cycle withcolor red;
  fi
  if vue>3 :
    draw c6--c2--q6--q5--c1--p5--p4--c0--c4;
    draw c2--c1--c0;
    draw c2--c9;
    draw c2--c3;
    draw c6--c7;
    draw c3--c0;
    draw c3--c7;
    drawarrow subpath(0,vue*(length fleche3)/vues) of fleche3 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    drawarrow subpath(0,vue*(length fleche3)/vues) of fleche3 shifted (-largeur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
    draw c4--c7--(point(vue*(length fleche3)/vues) of fleche3 shifted (-largeur))--(point(vue*(length fleche3)/vues) of fleche3)--cycle withcolor red;
  fi
  endfig;
discontinue;
endfor;
nextfig;
draw c6--c2--q6--q5--c1--p5--p4--c0--c4;
draw c2--c1--c0;
draw c2--c9;
draw c2--c3;
draw c6--c7;
draw c3--c0;
draw c3--c7;
draw c4--c7--point(length fleche3) of fleche3 shifted (-largeur)--point(length fleche3) of fleche3--cycle;
endfig;
for vue=0 upto 5 :
  nextfig;
  draw r6--c3--q6--q5--c1--p5--p4--c0--r5--cycle;
  draw c2--c1--c0--c3;
  draw c7--c4;
  drawarrow subpath(0,vue*(length fleche4)/vues) of fleche4 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
  drawarrow subpath(0,vue*(length fleche4)/vues) of fleche4 shifted (hauteur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
  draw c3--c2--(point(vue*(length fleche4)/vues) of fleche4 shifted (hauteur))--(point(vue*(length fleche4)/vues) of fleche4)--cycle withcolor red;
endfig;
discontinue;
endfor
nextfig;
draw r6--c3--q6--q5--c1--p5--p4--c0--r5--cycle;
draw c2--c1--c0--c3;
draw c7--c4;
draw c3--p7--p6--c2;
endfig;
for vue=0 upto vues :
  nextfig;
  pair mi[],mil[];
  if vue=0 :
  draw r6--c3--q6--q5--c1--p5--p4--c0--r5--cycle;
  draw c2--c1--c0--c3;
  draw c7--c4;
  draw c3--p7--p6--c2;
  mi[vue]=milieu(c3,(point(vue*(length fleche5)/vues) of fleche5 shifted (-largeur)));
  mil[vue]=mi[vue] shifted (largeur);
  draw mi[vue]--mil[vue] withcolor red;
  drawarrow subpath(0,vue*(length fleche5)/vues) of fleche5 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
  drawarrow subpath(0,vue*(length fleche5)/vues) of fleche5 shifted (-largeur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
  draw c0--c3--(point(vue*(length fleche5)/vues) of fleche5 shifted (-largeur))--(point(vue*(length fleche5)/vues) of fleche5)--cycle withcolor red;
fi
if vue>0 :
  draw c3--q6--q5--c1--p5--p4--c0--cycle;
  draw c2--c1--c0--c3;
  draw c3--p7--p6--c2;
  mi[vue]=milieu(c3,(point(vue*(length fleche5)/vues) of fleche5 shifted (-largeur)));
  mil[vue]=mi[vue] shifted (largeur);
  draw mi[vue]--mil[vue] withcolor red;
  drawarrow subpath(0,vue*(length fleche5)/vues) of fleche5 dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
  drawarrow subpath(0,vue*(length fleche5)/vues) of fleche5 shifted (-largeur) dashed dashpattern(on 12bp off 6bp on 3bp off 6bp);
  draw c0--c3--(point(vue*(length fleche5)/vues) of fleche5 shifted (-largeur))--(point(vue*(length fleche5)/vues) of fleche5)--cycle withcolor red;
fi
endfig;
discontinue;
endfor
nextfig;
  draw c3--q6--q5--c1--p5--p4--c0--cycle;
  draw c2--c1--c0--c3;
  draw c3--p7--p6--c2;
  %mi[]=milieu(c3,(point(vue*(length fleche5)/vues) of fleche5 shifted (-largeur)));
  %mil[vue]=mi[vue] shifted (largeur);
  draw mi[5]--mil[5];
  draw c0--c3--point(length fleche5) of fleche5 shifted (-largeur)--point(length fleche5) of fleche5--cycle;
endfig;
end