Initialisation du projet pst-solides3d.git (SVN revision 142)
[pst-solides3d.git] / doc-en / .svn / text-base / par-solidescreux-en.tex.svn-base
1 \section{Emptying a solid}
2 Several of the predefined solids have a ``\textit{hollow}'' relative which is naturally associated with it (the cone, the truncated cone, the cylinder, the prism and the spherical zone). For all those, the option \texttt{\Lkeyword{hollow}=true} is provided.
3 Set to \texttt{false}, we get the ``filled'' solid; set to \texttt{true} we get the ``hollow'' version.
4
5
6 \subsubsection{Example 1: a \Index{cylinder} and a \Index{hollow cylinder}}
7
8
9
10 \begin{LTXexample}[width=5cm]
11 \psset{unit=0.5}
12 \psset{lightsrc=viewpoint,viewpoint=50 60 25 rtp2xyz,Decran=50}
13 \begin{pspicture}(-2,-3)(6,6)
14 \psSolid[object=cylindre,h=6,r=2,
15    fillcolor=yellow,
16       ](0,4,0)
17 \end{pspicture}
18 \end{LTXexample}
19
20 \begin{LTXexample}[width=5cm]
21 \psset{unit=0.5}
22 \psset{lightsrc=viewpoint,viewpoint=50 60 25 rtp2xyz,Decran=50}
23 \begin{pspicture}(-2,-3)(6,6)
24 \psSolid[object=cylindre,h=6,r=2,
25    fillcolor=yellow,incolor=red,
26    hollow](0,4,0)
27 \end{pspicture}
28 \end{LTXexample}
29
30
31 \newpage
32
33 \subsubsection{Example 2: a \Index{prism} and a \Index{hollow prism}}
34
35 \begin{LTXexample}[width=8.7cm]
36 \psset{unit=0.5}
37 \psset{lightsrc=viewpoint,viewpoint=50 60 25 rtp2xyz,Decran=50}
38 \begin{pspicture}(-9,-4)(4,8)
39 \defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{}
40 \defFunction{G}(t){t cos}{t sin}{}
41 \psSolid[object=grille,base=-6 6 -4 4,action=draw]%
42 \psSolid[object=prisme,
43     h=8,fillcolor=yellow,
44     RotX=90,ngrid=8 18,
45     base=0 180 {F} CourbeR2+
46          180 0 {G} CourbeR2+](0,4,0)
47 \axesIIID(3,4,3)(8,6,7)
48 \end{pspicture}
49 \end{LTXexample}
50
51 \begin{LTXexample}[width=8.7cm]
52 \psset{unit=0.5}
53 \psset{lightsrc=viewpoint,viewpoint=50 60 25 rtp2xyz,Decran=50}
54 \begin{pspicture}(-9,-4)(3,8)
55 \defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{}
56 \defFunction{G}(t){t cos}{t sin}{}
57 \psSolid[object=grille,base=-6 6 -4 4,action=draw]%
58 \psSolid[object=prisme,
59     h=8,fillcolor=yellow,incolor=red,
60     RotX=90,hollow,ngrid=8 18,
61     base=0 180 {F} CourbeR2+
62          180 0 {G} CourbeR2+](0,4,0)
63 \axesIIID(3,4,3)(8,6,7)
64 \end{pspicture}
65 \end{LTXexample}
66
67 \newpage
68 \subsubsection{Example 3: a \Index{spherical zone} and a \Index{hollow spherical zone}}
69
70 \begin{LTXexample}[width=7.5cm]
71 \psset{unit=0.5}
72 \psset{lightsrc=10 20 30,viewpoint=50 60 25 rtp2xyz,Decran=50}
73 \begin{pspicture}(-7,-4)(5,7)
74 \psSolid[object=grille,
75     base=-5 5 -5 5,
76     action=draw]%
77 \psSolid[object=calottesphere,
78     r=3,ngrid=16 18,
79     fillcolor=cyan!50,
80     incolor=yellow,
81     theta=45,phi=-30](0,0,1.5)%
82 \axesIIID(3,3,3.6)(6,6,5)
83 \end{pspicture}
84 \end{LTXexample}
85
86 \begin{LTXexample}[width=7.5cm]
87 \psset{unit=0.5}
88 \psset{lightsrc=10 20 30,viewpoint=50 60 25 rtp2xyz,Decran=50}
89 \begin{pspicture}(-7,-5)(7,5)
90 \psSolid[object=calottesphere,
91     r=3,ngrid=16 18,
92     fillcolor=cyan!50,
93     incolor=yellow,
94     theta=45,phi=-30,
95     hollow,
96     RotY=-80]%
97 \axesIIID(0,3,3)(6,5,4)
98 \end{pspicture}
99 \end{LTXexample}
100
101
102 \endinput

Licence Creative Commons Les fichiers de Syracuse sont mis à disposition (sauf mention contraire) selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International.