Accueil > Informatique > Latex > Galerie de figures

Galerie de figures

samedi 3 octobre 2009, par Vincent

Un grand merci à Christophe Poulain pour ses extensions geometriesyret mp-solid.

Tétraèdre régulier

Tétraèdre régulier
%prologues := 2;
verbatimtex
%&latex
\documentclass{article}
\usepackage{lmodern}
\usepackage{amsfonts}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[frenchb]{babel}
\begin{document}
etex

input geometriesyr16;
u :=2cm;



figureespace(-5u,-5u,5u,5u);
Initialisation(5,35,55,900);
color D,A,B,C,M,N,P,K,R,O,G,I,J;
A=(0,0,sqrt(2));
B=(1,0,0);
D=(-1/2,sqrt(3)/2,0);
G:=(0,0,0);
O=1/4[G,A];

C=(-1/2,-sqrt(3)/2,0);

I=1/2[D,B];
J=1/2[C,D];


K=1/2[C,A];


trace demidroite(B,A) withcolor white;
path sections, section, fond;
 
sections=polygone(A,B,J);
fillcolor:= rouge;
trace sections withcolor bleu ;
fill sections withcolor .8gris;


 
section=polygone(A,C,I);
fillcolor:=.9gris;
transparence section;
trace section withcolor red;

 
trace polygone(C,A,B);
trace segment(A,D);


trace segment(A,C);
trace segment(D,C) dashed evenly; ;
trace segment(C,I) dashed evenly;
trace segment(B,J) dashed evenly;
trace segment(A,G) dashed evenly;
trace segment(K,I) dashed evenly;


trace Codelongueur(C,J,J,D,2);
trace Codelongueur(B,I,I,D,2);
trace Codelongueur(C,K,K,A,2);


trace segment(B,D);
nomme.top(A);
nomme.lft(B);
nomme.lft(C);
nomme.rt(D);
marque_p:="plein";

nomme.urt(O);


nomme.bot(G);
nomme.lrt(I);
nomme.urt(J); 
finespace;
end.

Prisme droit à base triangulaire

Prisme droit
%prologues := 2;

verbatimtex
%&latex
\documentclass{article}
\usepackage{lmodern}
\usepackage{amsfonts}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[frenchb]{babel}
        \begin{document}
etex
        
input geometriesyr16;
u := 1cm;

figureespace(-5u,-5u,5u,5u);
Initialisation(5,10,25,20u);
color O,A,B,C,D,E,F,AA,BB,G,H,K,L[];

numeric x,y,z,X,Y,Z;
path a,b,c,d,e,f,g,h;

G := (0,1,(1-19*(0-1))/16);
H := (0,0,(1-19*(0-0))/16);
K := (1,0,(1-19*(1-0))/16);




AA := (1,0,0);
B := (0,1,0);
BB := (0,2,0);
E := (0,0,1);
O := (0,0,0);


x := 0.5;
y := 1-x;
z := 0.8;



D := (x,y,1);
C := (0,1,1);
A := (x,y,0);


a := IntersectionPlanPlan(O,E,D,G,H,K);

b:= IntersectionPlanPlan(B,A,C,G,H,K);
c := IntersectionPlanPlan(E,D,C,G,H,K);
d := IntersectionPlanPlan(O,B,C,G,H,K);

e := IntersectionPlanPlan(O,B,AA,G,H,K);



trace demidroite(O,AA);
trace demidroite(O,E);
trace demidroite(B,BB);

drawoptions(withcolor blue);
trace a; 
drawoptions(withcolor red);
trace b;

drawoptions(withcolor green);
trace c;
drawoptions(withcolor red);
trace d;
drawoptions(withcolor green);
trace e;

drawoptions(withcolor black);
trace segment(O,B) dashed evenly;
trace segment(AA,B);
trace segment(E,C);
trace segment(E,D);
trace segment(C,B);
trace segment(C,D);
trace segment(A,D);
trace segment(C,D);
trace segment(O,A);
%trace segment(AA,F);
%trace segment(F,E);

marque_p := "plein";


nomme.lft(O);
nomme.bot(A);
nomme.bot(B);
%nomme.top(F);
nomme.rt(C);
nomme.top(D);
nomme.lft(E);
pointe(AA);

label.lft(btex $A'$ etex,Projette(AA));





finespace;
end.

La figure illustre l’exercice suivant.

Un patron de cône

Un patron de cône
figure(-4u, -14u , 15u , 14u )
hauteur=7;
rayon:=2;



pair O,M,S,I,J;

generatrice:=sqrt(hauteur**2+rayon**2);
angl:=360*rayon/generatrice;
angl0:=-15+180-angl/2;

O:=(0,0);
M:=(rayon*u,0);
S:=((generatrice+rayon)*u,0);
I:=((rayon+generatrice+generatrice*cosd(angl0))*u,generatrice*sind(angl0)*u);
J:=((rayon+generatrice+generatrice*cosd(angl0+angl))*u,generatrice*sind(angl0+angl)*u);

trace cercle(O,rayon*u);
trace segment(O,S);
trace segment(I,S);
trace segment(J,S);                                                                   
trace Codeangle(I,S,J,0,btex $\alpha$ etex);

 nomme.rt(S);
 nomme.lrt(M);
 nomme.bot(O);
trace arccercle(I,J,S);
fin;

Intersection de deux demi-cylindre

Intersection de deux demi-cylindres
Intersection de deux demi-cylindre. Légèrement retouchée avec Gimp.

Figure réalisée pour ce document.

input mp-solid

outcolor:=0.5[marron,blanc];
incolor:=0.5[rouge,blanc];

R:=4;
r:=3;

nb:=50;subh:=50;
creux:=true;
%arcenciel:=true;

Transparence:=true;

figureespace(-10u,-10u,10u,10u);
Initialisation(500,30,40,20);
%numeroteface:=true;


Ferme1:=false;
ObjetCylindre1("(R*cos(u),v,R*sin(u))",pi,0,-R,R);
%AffichageObjet1;

Ferme2:=false;
ObjetCylindre2("(v,r*cos(u),r*sin(u))",pi,0,-2*r,2*r);
%AffichageObjet2;


nbobj:=2;

DessineFusion;
pickup pencircle scaled 0.71mm;
draw Fonction("(+sqrt(R**2-(r*sin(t))**2),r*cos(t),r*sin(t))",0,pi-0.6,0.01) withcolor blue;
draw Fonction("(-sqrt(R**2-(r*sin(t))**2),r*cos(t),r*sin(t))",0,pi,0.01) withcolor blue  dashed evenly;
draw Fonction("(+sqrt(R**2-(r*sin(t))**2),r*cos(t),r*sin(t))",pi-0.6,pi,0.01) withcolor blue dashed evenly;


%TraceAxes;
finespace;

Voir en ligne : Le site de C. Poulain sur syracuse