1 \section[Paramètres
]{Les principaux solides prédéfinis et leurs paramètres
}
3 La commande de base est~:~
4 \Cadre{\textbackslash psSolid
[object=
\textsl{nom
}]$(x, y ,z)$
} qui permet
5 de tracer l'objet désigné par
\textsl{nom
} au point de coordonnées $(x, y,
8 Les objets disponibles sont~:
9 {\ttfamily%\flushleft \hyphenchar\font`\-%
10 cube, cylindre, cylindrecreux, cone, conecreux, tronccone,\\
11 troncconecreux, sphere, calottesphere, tore, anneau,
12 tetrahedron, octahedron, dodecahedron,\\
13 isocahedron, prisme, grille, parallelepiped, face, ruban, surface,
16 Le tableau ci-dessous donne un exemple de chacun des solides avec ses
20 \psset{lightsrc=
10 5 20,viewpoint=
50 20 30 rtp2xyz
}
21 \begin{tabular
}{>
{\bfseries\sffamily\color{blue
}}lcm
{4cm
}m
{5cm
}}
25 cube&
\texttt{[a=
4]} arête&
26 \begin{pspicture
}(-
2,-
2)(
2,
2)
27 % \psframe(-2,-2)(2,2)
30 object=cube,a=
2,action=draw*,fillcolor=magenta!
20]%
31 \axesIIID(
1,
1,
1)(
1.5,
1.5,
1.5)
49 \texttt{[ngrid=n1 n2
]}
52 \begin{pspicture
}(-
2,-
2.5)(
2,
3)
53 % \psframe(-2,-2)(2,2)
55 \psSolid[object=cylindre,h=
5,r=
2,fillcolor=white,ngrid=
4 32](
0,
0,-
3)
56 \axesIIID(
2,
2,
2.5)(
3,
3,
3.5)
74 \texttt{[ngrid=n1 n2
]}
77 \begin{pspicture
}(-
2,-
2.5)(
2,
3)
78 % \psframe(-2,-2)(2,2)
80 \psSolid[object=cylindrecreux,h=
5,r=
2,fillcolor=white,mode=
4,incolor=green!
50](
0,
0,-
2.5)
81 \axesIIID(
2,
2,
2.5)(
3,
3,
4.5)
100 \psset{lightsrc=
10 20 30,viewpoint=
50 20 30 rtp2xyz
}
101 \begin{tabular
}{>
{\bfseries\sffamily\color{blue
}}lcm
{4cm
}m
{5cm
}}
110 \texttt{[ngrid=n1 n2
]}
113 \begin{pspicture
}(-
2,-
1)(
2,
4)
114 % \psframe(-2,-2)(2,2)
116 \psSolid[object=cone,h=
5,r=
2,fillcolor=cyan,mode=
4]%
117 \axesIIID(
2,
2,
5)(
2.5,
2.5,
6)
120 \begin{minipage
}{5cm
}
135 \texttt{[ngrid=n1 n2
]}
138 \begin{pspicture
}(-
2,-
1)(
2,
4)
139 % \psframe(-2,-2)(2,2)
141 \psSolid[object=conecreux,h=
5,r=
2,fillcolor=white,mode=
4,RotY=-
60,incolor=green!
50]%
142 \axesIIID(
2,
2,
5)(
2.5,
2.5,
6)
145 \begin{minipage
}{5cm
}
159 \texttt{[h=
6,r0=
4,r1=
1.5]}\\
162 \texttt{[ngrid=n1 n2
]}
165 \begin{pspicture
}(-
2,-
1)(
2,
4)
166 % \psframe(-2,-2)(2,2)
168 \psSolid[object=tronccone,r0=
2,r1=
1.5,h=
5,fillcolor=cyan,mode=
4]%
169 \axesIIID(
2,
2,
5)(
2.5,
2.5,
6)
172 \begin{minipage
}{5cm
}
188 \texttt{[h=
6,r0=
4,r1=
1.5]}\\
191 \texttt{[ngrid=n1 n2
]}
194 \begin{pspicture
}(-
2,-
1)(
2,
4)
195 % \psframe(-2,-2)(2,2)
197 \psSolid[object=troncconecreux,r0=
2,r1=
1,h=
5,fillcolor=white,mode=
4]%
198 \axesIIID(
2,
2,
5)(
2.5,
2.5,
6)
201 \begin{minipage
}{5cm
}
204 object=troncconecreux,
216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
218 \psset{lightsrc=
10 20 30,viewpoint=
50 20 30 rtp2xyz
}
219 %\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{5cm}}
221 >
{\bfseries\sffamily\color{blue
}} l
222 >
{\centering} m
{4cm
} m
{4cm
} m
{5cm
}}
228 \texttt{[r=
2]} rayon\\
230 \texttt{[ngrid=n1 n2
]}
233 \begin{pspicture
}(-
2,-
2)(
2,
3)
234 % \psframe(-2,-2)(2,2)
236 \psSolid[object=sphere,r=
3,fillcolor=red!
25,ngrid=
18 18,linewidth=
0.2\pslinewidth]%
237 \axesIIID(
3,
3,
3)(
4,
4,
4)
240 \begin{minipage
}{5cm
}
244 r=
2,fillcolor=red!
25,
254 \texttt{[r=
2]} rayon\\
255 \texttt{[phi=
0,theta=
90]} \\
256 latitudes pour découper\\
257 la calotte respectivement \\
258 vers le bas et le haut \\
262 \begin{pspicture
}(-
4,-
5)(
5,
5.5)
263 \psset{lightsrc=
42 24 13,viewpoint=
50 30 15 rtp2xyz,Decran=
50}
264 \psSolid[object=calottesphere,r=
3,ngrid=
16 18,
265 fillcolor=cyan!
50,incolor=yellow,theta=
45,phi=-
30,hollow,RotY=-
80]%
266 \axesIIID(
0,
3,
3)(
6,
5,
4)
269 \begin{minipage
}{5cm
}
272 object=calottesphere,
281 \texttt{[r0=
4,r1=
1.5]} \\
285 \texttt{[ngrid=n1 n2
]}
288 \begin{pspicture
}(-
2,-
2)(
2,
3)
289 % \psframe(-2,-2)(2,2)
290 \psset{Decran=
30,unit=
0.9}
291 \psSolid[r1=
2.5,r0=
1.5,object=tore,ngrid=
18 36,fillcolor=green!
30,action=draw**
]%
292 \axesIIID(
4,
4,
0)(
5,
5,
4)
295 \begin{minipage
}{5cm
}
312 \texttt{[r1=
2.5,r0=
1.5,
}
314 \texttt{h=
6,section=...
]}
326 \begin{pspicture
}(-
2,-
2)(
2,
3)
327 % \psframe(-2,-2)(2,2)
329 \psSolid[object=anneau,fillcolor=yellow,h=
1.5,r1=
4,r0=
3]%
330 \axesIIID(
4,
4,
0)(
5,
5,
4)
333 \begin{minipage
}{5cm
}
344 Une documentation spécifique aux anneaux circulaires et aux
345 parallélépipèdes est fournie dans la partie exemples :
347 \item \texttt{doc-grille-parallelepiped.tex(.pdf)
} ;
348 \item \texttt{doc-anneau.tex(.pdf).
}
354 \psset{lightsrc=
10 20 30,viewpoint=
50 20 30 rtp2xyz
}
355 %\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{6cm}}
357 >
{\bfseries\sffamily\color{blue
}} l
358 >
{\centering} m
{4cm
} m
{4cm
} m
{5cm
}}
364 \texttt{[a=
2]} rayon\\
369 \begin{pspicture
}(-
2,-
2)(
2,
2)
370 % \psframe(-2,-2)(2,2)
372 \psSolid[object=tetrahedron,r=
3,linecolor=blue,action=draw
]%
375 \begin{minipage
}{5cm
}
387 \texttt{[a=
2]} rayon\\
392 \begin{pspicture
}(-
2,-
1.85)(
2,
2.85)
393 % \psframe(-2,-2)(2,2)
395 \psSolid[object=octahedron,a=
3,linecolor=blue,fillcolor=Turquoise
]%
396 \axesIIID(
3,
3,
3)(
4,
4,
4)
399 \begin{minipage
}{5cm
}
405 fillcolor=Turquoise
]%
411 \texttt{[a=
2]} rayon\\
416 \begin{pspicture
}(-
2,-
1.85)(
2,
1.85)
417 % \psframe(-2,-2)(2,2)
419 \psSolid[object=dodecahedron,a=
2.5,RotZ=
90,action=draw*,fillcolor=OliveGreen
]%
422 \begin{minipage
}{5cm
}
428 fillcolor=OliveGreen
]%
434 \texttt{[a=
2]} rayon\\
439 \begin{pspicture
}(-
2,-
1.85)(
2,
2.85)
440 % \psframe(-2,-2)(2,2)
442 \psSolid[object=icosahedron,a=
3,action=draw*,fillcolor=green!
50]%
443 \axesIIID(
3,
3,
3)(
4,
4,
4)
446 \begin{minipage
}{5cm
}
464 \texttt{-
1 -
1 1 -
1 0 1]}
469 \texttt{[h=
6]} hauteur
472 \begin{pspicture
}(-
2,-
2)(
2,
3)
473 % \psframe(-2,-2)(2,2)
474 \psset{Decran=
30,unit=
0.9}
475 \psSolid[object=prisme,action=draw*,linecolor=red,h=
4,fillcolor=gray!
50]%
476 \psSolid[object=grille,base=-
3 3 -
3 3,action=draw
]%
477 \axesIIID(
3,
3,
4)(
5,
5,
5)
480 \begin{minipage
}{5cm
}
494 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
496 \psset{lightsrc=
10 20 30,viewpoint=
50 20 30 rtp2xyz
}
497 %\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{6cm}}
499 >
{\bfseries\sffamily\color{blue
}} l
500 >
{\centering} m
{4cm
} m
{4cm
} m
{5cm
}}
507 \texttt{[base=-X +X -Y +Y
]}
510 \begin{pspicture
}(-
1.5,-
2)(
2,
3)
511 % \psframe(-2,-2)(2,2)
512 \psset{Decran=
30,unit=
0.9}
513 \psSolid[object=grille,base=-
5 5 -
3 3]%
514 \axesIIID(
5,
3,
0)(
6,
4,
4)
517 \begin{minipage
}{5cm
}
529 \texttt{[a=
4,b=a,c=a
]}\\
533 \begin{pspicture
}(-
1.5,-
2)(
2,
3)
535 \psSolid[object=parallelepiped,a=
5,b=
6,c=
2,fillcolor=bleuciel
](
0,
0,c
2 div)
536 \psSolid[object=grille,base=-
2.5 2.5 -
3 3,action=draw
](
0,
0,
2)
537 \psSolid[object=grille,base=-
1 1 -
3 3,RotY=
90,action=draw
](
2.5,
0,
1)
538 \psSolid[object=grille,base=-
2.5 2.5 -
1 1,RotX=-
90,action=draw
](
0,
3,
1)
539 \axesIIID(
2.5,
3,
2)(
3.5,
4,
4)
542 \begin{minipage
}{5cm
}
545 object=parallelepiped,
%
556 \texttt{[base=x0 y0 x1 y1
}\\
557 \texttt{~ x2 y2 etc.
]}\\
564 \psset{viewpoint=
50 -
20 30 rtp2xyz,Decran=
50}
565 \begin{pspicture
}(-
4,-
4)(
5,
4)
566 \psSolid[object=grille,base=-
4 6 -
4 4,action=draw,linecolor=gray
](
0,
0,
0)
567 \psSolid[object=face,fillcolor=yellow,
571 \psSolid[object=face,fillcolor=yellow,
575 \axesIIID(
0,
0,
0)(
6,
6,
3)
578 \begin{minipage
}{5cm
}
599 \texttt{[base=x0 y0 x1 y1
}\\
600 \texttt{~ x2 y2 etc.
]}\\
601 \texttt{[h=hauteur
]}\\
602 \texttt{[ngrid=valeur
]}\\
605 \texttt{[axe=
0 0 1]}\\
606 direction de l'inclinaison\\
610 \psset{lightsrc=
10 0 10,viewpoint=
50 -
20 30 rtp2xyz,Decran=
50,unit=
0.5}
611 \begin{pspicture
}(-
2,-
4)(
5,
7)
612 \psSolid[object=grille,base=-
4 6 -
2 4,action=draw,linecolor=gray
](
0,
0,
0)
613 \psSolid[object=ruban,h=
3,fillcolor=red!
50,
614 base=
0 0 2 2 4 0 6 2,
618 \axesIIID(
0,
2,
0)(
6,
6,
6)
621 \begin{minipage
}{5cm
}
626 base=
0 0 2 2 4 0 6 2,
639 %\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz}
640 %%\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{6cm}}
642 % >{\bfseries\sffamily\color{blue}} l
643 % >{\centering} m{4cm} m{4cm} m{5cm}}
648 %% \begin{tabular}{l}
649 %% dessine un chemin\\
650 %% défini en postscript\\
655 %% \begin{pspicture}(-2,-5)(6,8)%
656 %% \psframe*[linecolor=blue!50](-6,-5)(6,7)
657 %% \psset{lightsrc=50 20 20,viewpoint=50 30 15,Decran=60}
658 %% \psProjection[object=chemin,fillstyle=solid,fillcolor=white,
659 %% linewidth=.05,linecolor=red,
668 %% \psProjection[object=chemin,
679 %% \psProjection[object=chemin,fillstyle=hlines,hatchcolor=yellow,
691 %% \psPoint(0,0,0){O}
692 %% \psPoint(1,1,2){O1}\psPoint(1.4,1.4,2.8){K}
693 %% \psline[linewidth=.1,linecolor=red](O1)(K)
694 %% \psline[linestyle=dashed](O)(O1)
695 %% \psProjection[object=chemin,
702 %% 1 0 slineto](1,1,2)
703 %% \psProjection[object=chemin,
710 %% 0 1 slineto](1,1,2)
711 %% \axesIIID(4,4,2)(5,5,6)
714 %% \begin{minipage}{6cm}
716 %% \psProjection[object=chemin,
718 %% hatchcolor=yellow,
736 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
738 \psset{lightsrc=
10 20 30,viewpoint=
50 20 30 rtp2xyz
}
739 %\begin{tabular}{>{\bfseries\sffamily\color{blue}}lcm{4cm}m{6cm}}
741 >
{\bfseries\sffamily\color{blue
}} l
742 >
{\centering} m
{4cm
} m
{4cm
} m
{5cm
}}
755 \psset{lightsrc=
30 30 25}
756 \psset{viewpoint=
50 40 30 rtp2xyz,Decran=
50}
757 \begin{pspicture
}(-
4,-
8)(
6,
8)
758 \psSurface[ngrid=
.25 .25,incolor=white,axesboxed
](-
4,-
4)(
4,
4)
{%
759 x dup mul y dup mul
3 mul sub x mul
32 div
}
762 \begin{minipage
}{5cm
}
764 \psSurface[ngrid=
.25 .25,
765 incolor=Wwhite,axesboxed
]
767 x dup mul y dup mul
3 mul
777 par les coordonnées \\
783 \psset{viewpoint=
50 -
20 30 rtp2xyz,Decran=
50}
784 \begin{pspicture
}(-
5,-
4)(
5,
9)
785 %\psframe(-7,-4)(7,9)
811 \axesIIID(
0,
0,
0)(
5,
5,
7)
814 \begin{minipage
}{5cm
}
846 tracé d'une fonction\\
847 R --> R
\textsuperscript{3}\\
849 équations paramétriques\\
853 \psset{lightsrc=
10 -
20 50,viewpoint=
50 -
20 20 rtp2xyz,Decran=
50}
854 \begin{pspicture
}(-
6,-
3)(
5,
8)
855 \psframe*
[linecolor=blue!
50](-
6,-
3)(
6,
8)
856 \psSolid[object=grille,base=-
4 4 -
4 4,linecolor=red,linewidth=
0.5\pslinewidth]%
857 \axesIIID(
0,
0,
0)(
4,
4,
7)
858 \defFunction[algebraic
]{helice
}(t)
{3*cos(
4*t)
}{3*sin(
4*t)
}{t
}
859 \psSolid[object=courbe,r=
0,
861 linecolor=blue,linewidth=
0.1,
866 \begin{minipage
}{5cm
}
869 \defFunction[algebraic
]%
871 {3*cos(
4*t)
}{3*sin(
4*t)
}{t
}
872 \psSolid[object=courbe,r=
0,
874 linecolor=blue,linewidth=
0.1,
882 %% \begin{tabular}{l}
883 %% tracé d'une fonction\\
884 %% R --> R\textsuperscript{2}\\
886 %% équations paramétriques\\
890 %% \begin{pspicture}(-6,-7)(6,6)
891 %% \psframe*[linecolor=yellow!50](-6,-6)(6,6)
892 %% \psset{viewpoint=50 -20 30 rtp2xyz,Decran=50}
893 %% {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
894 %% \psSolid[object=grille,base=-4 4 -4 0,RotX=90,RotZ=90]%
895 %% \psSolid[object=grille,base=-4 4 -4 4]%
896 %% \psSolid[object=grille,base=-4 4 0 4,RotX=90,RotZ=90]}
897 %% \defFunction{parabole}(t){t}{t dup mul}{}
898 %% \defFunction{droite}(t){t}{t 2 add }{}
899 %% \axesIIID(0,0,0)(4,4,4)
900 %% \psProjection[object=chemin,
903 %% normal=0 1 0 1 0 0,
908 %% \psProjection[object=chemin,
911 %% normal=0 1 0 1 0 0,
916 %% \psProjection[object=courbeR2,
917 %% range=-1 2,fillstyle=vlines,hatchwidth=0.5\pslinewidth,
918 %% normal=0 1 0 1 0 0,
919 %% function=parabole]
920 %% \psProjection[object=courbeR2,
923 %% normal=0 1 0 1 0 0,
924 %% function=parabole]
925 %% \psProjection[object=courbeR2,
928 %% normal=0 1 0 1 0 0,
930 %% \psPoint(0,0,4.15){Z1}
931 %% \uput*[60](Z1){$z=y^2$}
932 %% \rput(0,-6.5){\psframebox[linecolor=yellow!50]{\texttt{$\backslash${}defFunction\{parabole\}(t)\{t\}\{t dup mul\}\{\}}}}
935 %% \begin{minipage}{6cm}
938 %% \psProjection[object=courbeR2,
941 %% normal=0 1 0 1 0 0,
942 %% function=parabole]