Geometriesyr16.mp

Ce fichier est une nouvelle évolution de la série geometriesyr. Après la version 15 qui a apportée le dessin à main levée, cette nouvelle version apporte, outre quelques macros supplémentaires de dessin, un module qui permet la géométrie spatiale.

exemple1.mp [ source brut ]

 input geometriesyr16;
 
 
Conversion au format PDF de exemple1.1
 figureespace(-5u,-5u,6.5u,6u);
 Initialisation(5,30,20,700);
 color A,B,C,D,E,F,G,H,I,J,K;
 trace Cube(A,B,C,D,E,F,G,H);
 nomme.llft(A);
 nomme.lrt(B);
 nomme.rt(C);
 nomme.ulft(D);
 nomme.top(E);
 nomme.top(F);
 nomme.ulft(G);
 nomme.top(H);
 I=1/2[A,B];
 J=1/2[B,C];
 K=1/2[E,D];
 path cc;
 cc=buildcycle(IntersectionPlanPlan(I,J,K,A,B,C),
   IntersectionPlanPlan(J,K,I,B,C,H),
   IntersectionPlanPlan(K,J,I,C,D,E),
   IntersectionPlanPlan(J,K,I,F,E,D),
   IntersectionPlanPlan(J,K,I,A,F,B));
 trace cc withcolor orange;
 marque_p:="plein";
 nomme.bot(I);
 nomme.bot(J);
 nomme.urt(K);
 finespace;
 end

Cette idée fait bien évidemment suite à celle sur le tracé à main levée. De quel autre type de tracés avais-je besoin ? Les quelques solides étudiés en collège, l'utilisation de théorèmes fondamentaux dans ces solides,... tout ça m'a amené à me pencher sur le problème.

Je ne souhaitais pas devoir régler tout moi même, ou alors utiliser un subterfuge pour obtenir, finalement, une figure qui ne respecte pas forcément les réglès de représentation de la géométrie spatiale.

D'ailleurs, voici un autre exemple obtenu avec geometriesyr16.mp.

exemple2.mp [ source brut ]

 input geometriesyr16;
 typerepre:="persp";
 
 
Conversion au format PDF de exemple2.1
 figureespace(-5u,-5u,5u,5u);
 Initialisation(10,0,10,35);
 trace cercles((0,0,0),(0,0,2),(0,0,0),(0,1,0),(0,0,1));
 path CL;
 CL=cercles((0,0,0),(0,2,0),(0,0,0),(0,1,0),(1,0,0));
 trace subpath(0,length CL/2) of CL;
 trace subpath(length CL/2,length CL) of CL dashed evenly;
 color M,M';
 M=(0,2*cosd(35),2*sind(35));
 M'=(-1,0,bluepart(M));
 color Cent;
 Cent=(0,0,bluepart(M));
 path Sect;
 Sect=cercles(Cent,M,Cent,M,M');
 remplis Sect withcolor 1.1*gris;
 trace subpath(0,length Sect/2) of Sect dashed evenly;
 trace subpath(length Sect/2,length Sect) of Sect;
 trace polygone(Cent,M,(0,0,0)) dashed evenly;
 trace codeperp((0,0,0),Cent,M,5);
 marque_p:="plein";
 pointe(M,(0,0,0),Cent);
 marque_p:="non";
 label.llft(btex $O$ etex,Projette((0,0,0)));
 label.top(btex $I$ etex,Projette(Cent));
 label.urt(btex $M$ etex,Projette(M));
 finespace;
 
 
Conversion au format PDF de exemple2.2
 figureespace(-5u,-5u,5u,5u);
 Initialisation(10,0,10,35);
 trace cercles((0,0,0),(0,0,2),(0,0,0),(0,1,0),(0,0,1));
 path CL;
 color M,M';
 color Cent;
 Cent=1/2[(0,0,0),(0,2*cosd(45),2*sind(45))];
 M=(0,2*cosd(-15),2*sind(-15));
 M'=(-1,greenpart(Cent),bluepart(Cent));
 path Sect;
 Sect=cercles(Cent,M,Cent,M,M');
 remplis Sect withcolor 1.1*gris;
 trace subpath(0,length Sect/2) of Sect dashed evenly;
 trace subpath(length Sect/2,length Sect) of Sect;
 CL=cercles((0,0,0),(0,2,0),(0,0,0),(0,1,0),(1,0,0));
 trace subpath(0,length CL/2) of CL;
 trace subpath(length CL/2,length CL) of CL dashed evenly;
 trace polygone(Cent,M,(0,0,0)) dashed evenly;
 trace codeperp((0,0,0),Cent,M,5);
 marque_p:="plein";
 pointe(M,(0,0,0),Cent);
 marque_p:="non";
 label.llft(btex $O$ etex,Projette((0,0,0)));
 label.top(btex $I$ etex,Projette(Cent));
 label.lrt(btex $M$ etex,Projette(M));
 finespace;
 
 
Conversion au format PDF de exemple2.3
 figureespace(-5u,-5u,5u,5u);
 Initialisation(10,0,10,35);
 trace cercles((0,0,0),(0,0,2),(0,0,0),(0,1,0),(0,0,1));
 path CL;
 color M,M';
 color Cent;
 M=(0,2*cosd(-130),2*sind(-130));
 Cent=ProjectionsurPlan(M,(0,0,0),(0,2*cosd(120),2*sind(120)),(1,0,0));
 M'=(-1,greenpart(Cent),bluepart(Cent));
 path Sect;
 Sect=cercles(Cent,M,Cent,M,M');
 remplis Sect withcolor 1.1*gris;
 trace subpath(0,length Sect/2) of Sect dashed evenly;
 trace subpath(length Sect/2,length Sect) of Sect;
 CL=cercles((0,0,0),(0,2,0),(0,0,0),(0,1,0),(1,0,0));
 trace subpath(0,length CL/2) of CL;
 trace subpath(length CL/2,length CL) of CL dashed evenly;
 trace polygone(Cent,M,(0,0,0)) dashed evenly;
 trace codeperp((0,0,0),Cent,M,5);
 marque_p:="plein";
 pointe(M,(0,0,0),Cent);
 marque_p:="non";
 label.top(btex $O$ etex,Projette((0,0,0)));
 label.bot(btex $I$ etex,Projette(Cent));
 label.llft(btex $M$ etex,Projette(M));
 finespace;
 end
[Suite...]