Initialisation du projet pst-solides3d.git (SVN revision 142)
[pst-solides3d.git] / doc / par-solidescreux.tex
1 \section {\' Evider un solide}
2
3 Certains des solides prédéfinis ont un solide ``{\sl creux}'' qui lui
4 est naturellement associé (le cône, le tronc de cône, le cylindre,
5 le prisme et la calotte sphérique). Pour ceux là, une option
6 \Cadre{[hollow=$boolean$]} est prévue. Positionné à
7 \textsl{false}, on a le solide habituel; positionné à \textsl{true} on
8 a la version creuse.
9 \newpage
10 \subsubsection {Exemple 1 : cylindre et cylindre creux}
11 \begin{multicols}{2}
12 \psset{unit=0.5}
13 \psset{lightsrc=10 20 30,viewpoint=50 60 25 rtp2xyz,Decran=50}
14 \setlength{\columnseprule}{1pt}
15 \centerline{
16 \begin{pspicture}(-2,-3)(6,6)
17 \psframe(-2,-3)(6,6)
18 \psSolid[object=cylindre,h=6,r=2,
19 fillcolor=yellow,incolor=red,
20 hollow,
21 ](0,4,0)
22 \end{pspicture}}
23 \columnbreak
24 \begin{gbar}
25 \begin{verbatim}
26 \psSolid[object=cylindre,
27 h=6,r=2,
28 fillcolor=yellow,
29 incolor=red,
30 hollow,
31 ](0,4,0)
32 \end{verbatim}
33 \end{gbar}
34 \end{multicols}
35 \begin{multicols}{2}
36 \psset{unit=0.5}
37 \psset{lightsrc=10 20 30,viewpoint=50 60 25 rtp2xyz,Decran=50}
38 \setlength{\columnseprule}{1pt}
39 \centerline{
40 \begin{pspicture}(-2,-3)(6,6)
41 \psframe(-2,-3)(6,6)
42 \psSolid[object=cylindre,h=6,r=2,
43 fillcolor=yellow,
44 ](0,4,0)
45 \end{pspicture}}
46 \begin{gbar}
47 \begin{verbatim}
48 \psSolid[object=cylindre,
49 h=6,r=2,
50 fillcolor=yellow,
51 ](0,4,0)
52 \end{verbatim}
53 \end{gbar}
54 \end{multicols}
55
56 \subsubsection {Exemple 2 : prisme et prisme creux}
57
58 \begin{minipage}{6cm}
59 \psset{unit=0.5}
60 \psset{lightsrc=10 20 30,viewpoint=50 60 25 rtp2xyz,Decran=50}
61 \begin{pspicture}(-8,-4)(4,8)
62 \psframe(-9,-3.5)(8,6)
63 \defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{}
64 \defFunction{G}(t){t cos}{t sin}{}
65 \psSolid[object=grille,base=-6 6 -4 4,action=draw]%
66 \psSolid[object=prisme,h=8,fillcolor=yellow,RotX=90,%decal=0,
67 resolution=19,
68 base=0 180 {F} CourbeR2+
69 180 0 {G} CourbeR2+
70 ](0,4,0)
71 \axesIIID(3,4,3)(8,6,7)
72 \end{pspicture}
73 \end{minipage}
74 \hfill
75 \begin{minipage}{8cm}
76 \small
77 \begin{verbatim}
78 \defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{}
79 \defFunction{G}(t){t cos}{t sin}{}
80 \psSolid[
81 object=grille,base=-6 6 -4 4,action=draw]%
82 \psSolid[
83 object=prisme,h=8,fillcolor=yellow,RotX=90,
84 resolution=19,
85 base=0 180 {F} CourbeR2+
86 180 0 {G} CourbeR2+
87 ](0,4,0)
88 \axesIIID(3,4,3)(8,6,7)
89 \end{verbatim}
90 \end{minipage}
91
92 \begin{minipage}{6cm}
93 \psset{unit=0.5}
94 \psset{lightsrc=10 20 30,viewpoint=50 60 25 rtp2xyz,Decran=50}
95 \begin{pspicture}(-8,-4)(3,8)
96 \psframe(-9,-3.5)(8,6)
97 \defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{}
98 \defFunction{G}(t){t cos}{t sin}{}
99 \psSolid[object=grille,base=-6 6 -4 4,action=draw]%
100 \psSolid[object=prisme,h=8,fillcolor=yellow,RotX=90,
101 hollow,ngrid=4,incolor=red,
102 resolution=19,
103 base=0 180 {F} CourbeR2+
104 180 0 {G} CourbeR2+
105 ](0,4,0)
106 \axesIIID(3,4,3)(8,6,7)
107 \end{pspicture}
108 \end{minipage}
109 \hfill
110 \begin{minipage}{8cm}
111 \small
112 \begin{verbatim}
113 \defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{}
114 \defFunction{G}(t){t cos}{t sin}{}
115 \psSolid[
116 object=grille,base=-6 6 -4 4,action=draw]%
117 \psSolid[
118 object=prisme,h=8,fillcolor=yellow,RotX=90,
119 hollow,ngrid=4,incolor=red,
120 resolution=19,
121 base=0 180 {F} CourbeR2+
122 180 0 {G} CourbeR2+
123 ](0,4,0)
124 \axesIIID(3,4,3)(8,6,7)
125 \end{verbatim}
126 \end{minipage}
127
128 \subsubsection {Exemple 3 : calotte sphérique et calotte sphérique creuse}
129
130 \begin{multicols}{2}
131 \psset{unit=0.5}
132 \psset{lightsrc=42 24 13,viewpoint=50 30 15 rtp2xyz,Decran=50}
133 \setlength{\columnseprule}{1pt}
134 \centerline{
135 \begin{pspicture}(-5,-5)(5,5)
136 \psframe(-5,-5)(5,5)
137 \psset{unit=0.92}
138 \psSolid[object=calottesphere,r=3,ngrid=16 18,
139 fillcolor=cyan!50,incolor=yellow,theta=45,phi=-30,hollow,RotY=-80]%
140 \axesIIID(0,3,3)(6,5,4)
141 \end{pspicture}}
142 \begin{verbatim}
143 \psSolid[object=calottesphere,r=3,
144 ngrid=16 18,
145 fillcolor=cyan!50,incolor=yellow,
146 theta=45,phi=-30,hollow,RotY=-60]%
147 \end{verbatim}
148 \columnbreak
149 \centerline{
150 \begin{pspicture}(-5,-3)(5,7)
151 \psframe(-5,-3)(5,7)
152 \psSolid[object=grille,base=-5 5 -5 5,action=draw]%
153 \psSolid[object=calottesphere,r=3,ngrid=16 18,
154 fillcolor=cyan!50,incolor=yellow,theta=45,phi=-30](0,0,1.5)%
155 \axesIIID(3,3,3.6)(6,6,5)
156 \end{pspicture}}
157 \begin{verbatim}
158 \psSolid[object=calottesphere,r=3,
159 ngrid=16 18,fillcolor=cyan!50,
160 incolor=yellow,theta=45,phi=-30]
161 (0,0,1.5)
162 \end{verbatim}
163 \end{multicols}

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.