Retour

Source : intersection.mp

intersection.mp
%@AUTEUR: Guillaume Connan
 
prologues:=1;
 
input geometriesyr16;
input fichierps;
 
verbatimtex
%&latex
\documentclass{article}
\begin{document}
etex
 
InitFichierPS(-6u,-7u,8u,7u);
 
pickup pencircle scaled 1.2bp;
 
 
typerepre:="persp";
 
figureespace(-20u,-20u,20u,20u);
 Initialisation(5,30,35,200);
 color A,B,C,D,E,F,G,H,I,J,K,L,M;
 trace Cube(A,B,C,D,E,F,G,H);
 I=1/3[F,A];
 J=2/3[D,C];
 K=1/4[H,C];
 L=IntersectionDroite(J,K,E,H);
 label.top(btex A etex,Projette(L))withcolor white;
 
 path section;
 section=buildcycle(IntersectionPlanPlan(H,G,F,I,J,K),
    IntersectionPlanPlan(A,G,F,I,J,K),
    IntersectionPlanPlan(A,E,F,I,J,K),
    IntersectionPlanPlan(A,D,C,I,J,K),
    segment(J,K),
    IntersectionPlanPlan(G,H,C,I,J,K));
 fillcolor:=1.3orange;
 %transparence section;
 nomme.llft(A);
 nomme.bot(B);
 nomme.rt(C);
 nomme.ulft(D);
 nomme.ulft(E);
 nomme.lft(F);
 nomme.lrt(G);
 nomme.urt(H);
 marque_p:="plein";
 nomme.lft(I);
 nomme.top(J);
 nomme.lft(K);
 finespace;
 
 
 
 
 
 
 
 
 
 
 %2
 
 
figureespace(-20u,-20u,20u,20u);
 Initialisation(5,30,35,200);
 color A,B,C,D,E,F,G,H,I,J,K, L,M;
 trace Cube(A,B,C,D,E,F,G,H);
 I=1/3[F,A];
 J=2/3[D,C];
 K=1/4[H,C];
 L=IntersectionDroite(J,K,E,H);
 label.top(btex A etex,Projette(L))withcolor white;
 trace segment(J,K) dashed evenly 
 withcolor bleu withpen pencircle scaled 1.5bp;
 
 path section,fond;
 section=buildcycle(IntersectionPlanPlan(H,G,F,I,J,K),
    IntersectionPlanPlan(A,G,F,I,J,K),
    IntersectionPlanPlan(A,E,F,I,J,K),
    IntersectionPlanPlan(A,D,C,I,J,K),
    segment(J,K),
    IntersectionPlanPlan(G,H,C,I,J,K));
 fillcolor:=jaune;
 fond=polygone(D,C,L,E);
 transparence fond;
 %nomme.top(L);
 nomme.llft(A);
 nomme.bot(B);
 nomme.rt(C);
 nomme.ulft(D);
 nomme.ulft(E);
 nomme.lft(F);
 nomme.lrt(G);
 nomme.urt(H);
 marque_p:="plein";
 nomme.lft(I);
 nomme.top(J);
 nomme.lft(K);
 finespace;
 
 
 
 
 
 
 
 
 %3
 
 
figureespace(-20u,-20u,20u,20u);
 Initialisation(5,30,35,200);
 color A,B,C,D,E,F,G,H,I,J,K, L,M;
 trace Cube(A,B,C,D,E,F,G,H);
 I=1/3[F,A];
 J=2/3[D,C];
 K=1/4[H,C];
 L=IntersectionDroite(J,K,E,H);
 label.top(btex A etex,Projette(L))withcolor white;
 trace segment(J,K) dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(K,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 
 path section;
 section=buildcycle(IntersectionPlanPlan(H,G,F,I,J,K),
    IntersectionPlanPlan(A,G,F,I,J,K),
    IntersectionPlanPlan(A,E,F,I,J,K),
    IntersectionPlanPlan(A,D,C,I,J,K),
    segment(J,K),
    IntersectionPlanPlan(G,H,C,I,J,K));
 fillcolor:=jaune;
 path fond;
 fond=polygone(D,C,L,E);
 transparence fond;
 nomme.llft(A);
 nomme.bot(B);
 nomme.rt(C);
 nomme.ulft(D);
 nomme.ulft(E);
 nomme.lft(F);
 nomme.lrt(G);
 nomme.urt(H);
 marque_p:="plein";
 nomme.lft(I);
 nomme.top(J);
 nomme.lft(K);
 finespace;
 
 
 
 
 
 %4
 
 
 
 
figureespace(-20u,-20u,20u,20u);
 Initialisation(5,30,35,200);
 color A,B,C,D,E,F,G,H,I,J,K, L,M;
 trace Cube(A,B,C,D,E,F,G,H);
 I=1/3[F,A];
 J=2/3[D,C];
 K=1/4[H,C];
 L=IntersectionDroite(J,K,E,H);
 trace segment(J,K) dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(K,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(H,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 
 path section;
 section=buildcycle(IntersectionPlanPlan(H,G,F,I,J,K),
    IntersectionPlanPlan(A,G,F,I,J,K),
    IntersectionPlanPlan(A,E,F,I,J,K),
    IntersectionPlanPlan(A,D,C,I,J,K),
    segment(J,K),
    IntersectionPlanPlan(G,H,C,I,J,K));
 fillcolor:=jaune;
 path fond;
 fond=polygone(D,C,L,E);
 transparence fond;
 nomme.top(L);
 nomme.llft(A);
 nomme.bot(B);
 nomme.rt(C);
 nomme.ulft(D);
 nomme.ulft(E);
 nomme.lft(F);
 nomme.lrt(G);
 nomme.urt(H);
 marque_p:="plein";
 nomme.lft(I);
 nomme.top(J);
 nomme.lft(K);
 finespace;
 
 
 
 
 
 %5
 
 
 
 
 
figureespace(-20u,-20u,20u,20u);
 Initialisation(5,30,35,200);
 color A,B,C,D,E,F,G,H,I,J,K, L,M;
 trace Cube(A,B,C,D,E,F,G,H);
 I=1/3[F,A];
 J=2/3[D,C];
 K=1/4[H,C];
 L=IntersectionDroite(J,K,E,H);
 trace segment(J,K) dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(K,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(H,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(F,A) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 
 path section;
 section=buildcycle(IntersectionPlanPlan(H,G,F,I,J,K),
    IntersectionPlanPlan(A,G,F,I,J,K),
    IntersectionPlanPlan(A,E,F,I,J,K),
    IntersectionPlanPlan(A,D,C,I,J,K),
    segment(J,K),
    IntersectionPlanPlan(G,H,C,I,J,K));
 
 
 fillcolor:=jaune;
 path face;
 face=polygone(F,G,B,A);
 transparence face;
 nomme.top(L);
 nomme.llft(A);
 nomme.bot(B);
 nomme.rt(C);
 nomme.ulft(D);
 nomme.ulft(E);
 nomme.lft(F);
 nomme.lrt(G);
 nomme.urt(H);
 marque_p:="plein";
 nomme.lft(I);
 nomme.top(J);
 nomme.lft(K);
 finespace;
 
 
%6
 
 
 
 
 
figureespace(-20u,-20u,20u,20u);
 Initialisation(5,30,35,200);
 color A,B,C,D,E,F,G,H,I,J,K, L,M;
 trace Cube(A,B,C,D,E,F,G,H);
 I=1/3[F,A];
 J=2/3[D,C];
 K=1/4[H,C];
 L=IntersectionDroite(J,K,E,H);
 trace segment(J,K) dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(K,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(H,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(F,A) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(H,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(L,H) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 
 path section;
 section=buildcycle(IntersectionPlanPlan(H,G,F,I,J,K),
    IntersectionPlanPlan(A,G,F,I,J,K),
    IntersectionPlanPlan(A,E,F,I,J,K),
    IntersectionPlanPlan(A,D,C,I,J,K),
    segment(J,K),
    IntersectionPlanPlan(G,H,C,I,J,K));
 fillcolor:=orange;
 
 path fond;
 fond=polygone(F,E,L,G);
 transparence fond;
 nomme.top(L);
 nomme.llft(A);
 nomme.bot(B);
 nomme.rt(C);
 nomme.ulft(D);
 nomme.ulft(E);
 nomme.lft(F);
 nomme.lrt(G);
 nomme.urt(H);
 marque_p:="plein";
 nomme.lft(I);
 nomme.top(J);
 nomme.lft(K);
 finespace;
 
 
 
 
 %7
 
 
 
figureespace(-20u,-20u,20u,20u);
 Initialisation(5,30,35,200);
 color A,B,C,D,E,F,G,H,I,J,K, L,M;
 trace Cube(A,B,C,D,E,F,G,H);
 I=1/3[F,A];
 J=2/3[D,C];
 K=1/4[H,C];
 L=IntersectionDroite(J,K,E,H);
 trace segment(J,K) dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(K,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(H,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(F,A) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(H,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(L,H) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,D,C,I,J,K) 
    cutbefore segment(D,C) 
    cutafter segment(D,A)  dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 
 path section;
 section=buildcycle(IntersectionPlanPlan(H,G,F,I,J,K),
    IntersectionPlanPlan(A,G,F,I,J,K),
    IntersectionPlanPlan(A,E,F,I,J,K),
    IntersectionPlanPlan(A,D,C,I,J,K),
    segment(J,K),
    IntersectionPlanPlan(G,H,C,I,J,K));
 fillcolor:=orange;
 path fond;
 fond=polygone(D,A,B,C);
 transparence fond;
 nomme.top(L);
 nomme.llft(A);
 nomme.bot(B);
 nomme.rt(C);
 nomme.ulft(D);
 nomme.ulft(E);
 nomme.lft(F);
 nomme.lrt(G);
 nomme.urt(H);
 marque_p:="plein";
 nomme.lft(I);
 nomme.top(J);
 nomme.lft(K);
 finespace;
 
 
 
 
 %8
 
 
 
 
figureespace(-20u,-20u,20u,20u);
 Initialisation(5,30,35,200);
 color A,B,C,D,E,F,G,H,I,J,K, L,M;
 trace Cube(A,B,C,D,E,F,G,H);
 I=1/3[F,A];
 J=2/3[D,C];
 K=1/4[H,C];
 L=IntersectionDroite(J,K,E,H);
 
 fillcolor:=jaune;
 path fond;
 fond=polygone(F,E,D,A);
 transparence fond;
 trace segment(J,K) dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(K,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(H,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(F,A) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(H,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(L,H) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,D,C,I,J,K) 
    cutbefore segment(D,C) 
    cutafter segment(D,A)  dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,E,F,I,J,K) 
    cutbefore segment(F,A) 
    cutafter segment(D,A)  dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 
 path section;
 section=buildcycle(IntersectionPlanPlan(H,G,F,I,J,K),
    IntersectionPlanPlan(A,G,F,I,J,K),
    IntersectionPlanPlan(A,E,F,I,J,K),
    IntersectionPlanPlan(A,D,C,I,J,K),
    segment(J,K),
    IntersectionPlanPlan(G,H,C,I,J,K));
 
 
 nomme.top(L);
 nomme.llft(A);
 nomme.bot(B);
 nomme.rt(C);
 nomme.ulft(D);
 nomme.ulft(E);
 nomme.lft(F);
 nomme.lrt(G);
 nomme.urt(H);
 marque_p:="plein";
 nomme.lft(I);
 nomme.top(J);
 nomme.lft(K);
 finespace;
 
 
 
 
 
%9
 
 
 
 
 
 
figureespace(-20u,-20u,20u,20u);
 Initialisation(5,30,35,200);
 color A,B,C,D,E,F,G,H,I,J,K, L,M;
 trace Cube(A,B,C,D,E,F,G,H);
 I=1/3[F,A];
 J=2/3[D,C];
 K=1/4[H,C];
 L=IntersectionDroite(J,K,E,H);
 trace segment(J,K) dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(K,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(H,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(F,A) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(H,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(L,H) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,D,C,I,J,K) 
    cutbefore segment(D,C) 
    cutafter segment(D,A)  dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,E,F,I,J,K) 
    cutbefore segment(F,A) 
    cutafter segment(D,A)  dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(G,H,C,I,J,K) 
    cutbefore segment(H,G) 
    cutafter segment(H,C) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 
 path section;
 section=buildcycle(IntersectionPlanPlan(H,G,F,I,J,K),
    IntersectionPlanPlan(A,G,F,I,J,K),
    IntersectionPlanPlan(A,E,F,I,J,K),
    IntersectionPlanPlan(A,D,C,I,J,K),
    segment(J,K),
    IntersectionPlanPlan(G,H,C,I,J,K));
 fillcolor:=orange;
 fillcolor:=jaune;
 path fond;
 fond=polygone(G,B,C,H);
 transparence fond;
 
 trace IntersectionPlanPlan(H,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(L,H) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 nomme.top(L);
 nomme.llft(A);
 nomme.bot(B);
 nomme.rt(C);
 nomme.ulft(D);
 nomme.ulft(E);
 nomme.lft(F);
 nomme.lrt(G);
 nomme.urt(H);
 marque_p:="plein";
 nomme.lft(I);
 nomme.top(J);
 nomme.lft(K);
 finespace;
 
 
 
%10
 
 
figureespace(-20u,-20u,20u,20u);
 Initialisation(5,30,35,200);
 color A,B,C,D,E,F,G,H,I,J,K, L,M,N,O,P;
 trace Cube(A,B,C,D,E,F,G,H);
 I=1/3[F,A];
 J=2/3[D,C];
 K=1/4[H,C];
 L=IntersectionDroite(J,K,E,H);
 trace segment(J,K) dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(K,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace segment(H,L) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 
 
 I-N=whatever*(J-K);
 F-N=whatever*(F-G);;
 A-P=whatever*(A-D);
 G-O=whatever*(G-H);
 N-O=whatever*(N-L);
 P-J=whatever*(N-O);
 P-I=whatever*(K-O);
 
 trace IntersectionPlanPlan(A,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(F,A) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(H,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(L,H) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,D,C,I,J,K) 
    cutbefore segment(D,C) 
    cutafter segment(D,A)  dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,E,F,I,J,K) 
    cutbefore segment(F,A) 
    cutafter segment(D,A)  dashed evenly 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(G,H,C,I,J,K) 
    cutbefore segment(H,G) 
    cutafter segment(H,C) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 
 path section;
 section=buildcycle(IntersectionPlanPlan(H,G,F,I,J,K),
    IntersectionPlanPlan(A,G,F,I,J,K),
    IntersectionPlanPlan(A,E,F,I,J,K),
    IntersectionPlanPlan(A,D,C,I,J,K),
    segment(J,K),
    IntersectionPlanPlan(G,H,C,I,J,K));
 fillcolor:=ciel;
 transparence section;
 nomme.top(L);nomme.top(O);nomme.top(N);nomme.bot(P);
 nomme.llft(A);
 nomme.bot(B);
 nomme.rt(C);
 nomme.ulft(D);
 nomme.ulft(E);
 nomme.lft(F);
 nomme.lrt(G);
 nomme.urt(H);
 marque_p:="plein";
 nomme.lft(I);
 nomme.top(J);
 nomme.lft(K);
 finespace;
 
 
 
 %11
 
 
figureespace(-20u,-20u,20u,20u);
 Initialisation(5,30,35,200);
 color A,B,C,D,E,F,G,H,I,J,K, L,M,N,O,P;
 picture c;
 c:=Cube(A,B,C,D,E,F,G,H);
 I=1/3[F,A];
 J=2/3[D,C];
 K=1/4[H,C];
 L=IntersectionDroite(J,K,E,H);
 trace segment(J,K)  
    withcolor bleu withpen pencircle scaled 1.5bp;
 
 
 I-N=whatever*(J-K);
 F-N=whatever*(F-G);;
 A-P=whatever*(A-D);
 G-O=whatever*(G-H);
 N-O=whatever*(N-L);
 P-J=whatever*(N-O);
 P-I=whatever*(K-O);
 
 trace segment(J,K)  withcolor bleu withpen pencircle scaled 1.5bp;
 
 trace IntersectionPlanPlan(A,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(F,A) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(H,G,F,I,J,K) 
    cutbefore segment(F,G) 
    cutafter segment(O,H) 
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,D,C,I,J,K) 
    cutbefore segment(D,C) 
    cutafter segment(D,A)   
    withcolor bleu withpen pencircle scaled 1.5bp;
 trace IntersectionPlanPlan(A,E,F,I,J,K) 
    cutbefore segment(F,A) 
    cutafter segment(D,A)   
    withcolor bleu withpen pencircle scaled 1.5bp;
  trace IntersectionPlanPlan(G,H,C,I,J,K) 
    cutbefore segment(H,G) 
    cutafter segment(H,C) 
    withcolor bleu withpen pencircle scaled 1.5bp;
  label.llft(btex A etex,Projette(A))withcolor white;
  label.bot(btex B etex,Projette(B))withcolor white;
  label.rt(btex A etex,Projette(C))withcolor white;
  label.lrt(btex A etex,Projette(G))withcolor white;
  label.top(btex A etex,Projette(L))withcolor white;
 
 
 
  trace segment(F,I)   withpen pencircle ;
  trace segment(F,N)   withpen pencircle ;
  trace segment(F,E)   withpen pencircle ;
  trace segment(E,H)   withpen pencircle ;
  trace segment(H,O)   withpen pencircle ;
  trace segment(H,K)   withpen pencircle ;
  trace segment(E,D)   withpen pencircle  dashed evenly;
  trace segment(P,D)   withpen pencircle dashed evenly;
  trace segment(J,D)  withpen pencircle  dashed evenly;
 
 
 
  path section;
 section=buildcycle(IntersectionPlanPlan(H,G,F,I,J,K),
    IntersectionPlanPlan(A,G,F,I,J,K),
    IntersectionPlanPlan(A,E,F,I,J,K),
    IntersectionPlanPlan(A,D,C,I,J,K),
    segment(J,K),
    IntersectionPlanPlan(G,H,C,I,J,K));
 fillcolor:=ciel;
 transparence section;
 nomme.top(O);nomme.top(N);nomme.bot(P);
 nomme.ulft(D);
 nomme.ulft(E);
 nomme.lft(F);
 nomme.urt(H);
 marque_p:="plein";
 nomme.lft(I);
 nomme.top(J);
 nomme.lft(K);
 
finespace;
 
end