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.
6 \subsubsection{Example
1: a
\Index{cylinder
} and a
\Index{hollow cylinder
}}
10 \begin{LTXexample
}[width=
5cm
]
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,
20 \begin{LTXexample
}[width=
5cm
]
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,
33 \subsubsection{Example
2: a
\Index{prism
} and a
\Index{hollow prism
}}
35 \begin{LTXexample
}[width=
8.7cm
]
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,
45 base=
0 180 {F
} CourbeR2+
46 180 0 {G
} CourbeR2+
](
0,
4,
0)
47 \axesIIID(
3,
4,
3)(
8,
6,
7)
51 \begin{LTXexample
}[width=
8.7cm
]
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)
68 \subsubsection{Example
3: a
\Index{spherical zone
} and a
\Index{hollow spherical zone
}}
70 \begin{LTXexample
}[width=
7.5cm
]
72 \psset{lightsrc=
10 20 30,viewpoint=
50 60 25 rtp2xyz,Decran=
50}
73 \begin{pspicture
}(-
7,-
4)(
5,
7)
74 \psSolid[object=grille,
77 \psSolid[object=calottesphere,
81 theta=
45,phi=-
30](
0,
0,
1.5)
%
82 \axesIIID(
3,
3,
3.6)(
6,
6,
5)
86 \begin{LTXexample
}[width=
7.5cm
]
88 \psset{lightsrc=
10 20 30,viewpoint=
50 60 25 rtp2xyz,Decran=
50}
89 \begin{pspicture
}(-
7,-
5)(
7,
5)
90 \psSolid[object=calottesphere,
97 \axesIIID(
0,
3,
3)(
6,
5,
4)