summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-solides3d/doc/par-solidescreux.tex
blob: 3f713511b229d83f4eae17e1473425c7f3684306 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
\section {\' Evider un solide}

Certains des solides prédéfinis ont un solide  ``{\sl creux}'' qui lui
est naturellement associé (le cône, le tronc de cône, le cylindre,
le prisme et la calotte sphérique). Pour ceux là, une option
\Cadre{[hollow=$boolean$]} est prévue. Positionné à
\textsl{false}, on a le solide habituel; positionné à \textsl{true} on
a la version creuse.
\newpage
\subsubsection {Exemple 1 : cylindre et cylindre creux}
\begin{multicols}{2}
\psset{unit=0.5}
\psset{lightsrc=10 20 30,viewpoint=50 60 25 rtp2xyz,Decran=50}
\setlength{\columnseprule}{1pt}
\centerline{
\begin{pspicture}(-2,-3)(6,6)
\psframe(-2,-3)(6,6)
\psSolid[object=cylindre,h=6,r=2,
   fillcolor=yellow,incolor=red,
   hollow,
      ](0,4,0)
\end{pspicture}}
\columnbreak
\begin{gbar}
\begin{verbatim}
   \psSolid[object=cylindre,
      h=6,r=2,
      fillcolor=yellow,
      incolor=red,
      hollow,
      ](0,4,0)
\end{verbatim}
\end{gbar}
\end{multicols}
\begin{multicols}{2}
\psset{unit=0.5}
\psset{lightsrc=10 20 30,viewpoint=50 60 25 rtp2xyz,Decran=50}
\setlength{\columnseprule}{1pt}
\centerline{
\begin{pspicture}(-2,-3)(6,6)
\psframe(-2,-3)(6,6)
\psSolid[object=cylindre,h=6,r=2,
   fillcolor=yellow,
      ](0,4,0)
\end{pspicture}}
\begin{gbar}
\begin{verbatim}
   \psSolid[object=cylindre,
      h=6,r=2,
      fillcolor=yellow,
      ](0,4,0)
\end{verbatim}
\end{gbar}
\end{multicols}

\subsubsection {Exemple 2 : prisme et prisme creux}

\begin{minipage}{6cm}
\psset{unit=0.5}
\psset{lightsrc=10 20 30,viewpoint=50 60 25 rtp2xyz,Decran=50}
\begin{pspicture}(-8,-4)(4,8)
\psframe(-9,-3.5)(8,6)
\defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{}
\defFunction{G}(t){t cos}{t sin}{}
\psSolid[object=grille,base=-6 6 -4 4,action=draw]%
\psSolid[object=prisme,h=8,fillcolor=yellow,RotX=90,%decal=0,
      resolution=19,
      base=0 180 {F} CourbeR2+
           180 0 {G} CourbeR2+
      ](0,4,0)
\axesIIID(3,4,3)(8,6,7)
\end{pspicture}
\end{minipage}
\hfill
\begin{minipage}{8cm}
\small
\begin{verbatim}
\defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{}
\defFunction{G}(t){t cos}{t sin}{}
\psSolid[
   object=grille,base=-6 6 -4 4,action=draw]%
\psSolid[
   object=prisme,h=8,fillcolor=yellow,RotX=90,
   resolution=19,
   base=0 180 {F} CourbeR2+
        180 0 {G} CourbeR2+
   ](0,4,0)
\axesIIID(3,4,3)(8,6,7)
\end{verbatim}
\end{minipage}

\begin{minipage}{6cm}
\psset{unit=0.5}
\psset{lightsrc=10 20 30,viewpoint=50 60 25 rtp2xyz,Decran=50}
\begin{pspicture}(-8,-4)(3,8)
\psframe(-9,-3.5)(8,6)
\defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{}
\defFunction{G}(t){t cos}{t sin}{}
\psSolid[object=grille,base=-6 6 -4 4,action=draw]%
\psSolid[object=prisme,h=8,fillcolor=yellow,RotX=90,
      hollow,ngrid=4,incolor=red,
      resolution=19,
      base=0 180 {F} CourbeR2+
           180 0 {G} CourbeR2+
      ](0,4,0)
\axesIIID(3,4,3)(8,6,7)
\end{pspicture}
\end{minipage}
\hfill
\begin{minipage}{8cm}
\small
\begin{verbatim}
\defFunction{F}(t){t cos 3 mul}{t sin 3 mul}{}
\defFunction{G}(t){t cos}{t sin}{}
\psSolid[
   object=grille,base=-6 6 -4 4,action=draw]%
\psSolid[
   object=prisme,h=8,fillcolor=yellow,RotX=90,
   hollow,ngrid=4,incolor=red,
   resolution=19,
   base=0 180 {F} CourbeR2+
        180 0 {G} CourbeR2+
   ](0,4,0)
\axesIIID(3,4,3)(8,6,7)
\end{verbatim}
\end{minipage}

\subsubsection {Exemple 3 : calotte sphérique et calotte sphérique creuse}

\begin{multicols}{2}
\psset{unit=0.5}
\psset{lightsrc=42 24 13,viewpoint=50 30 15 rtp2xyz,Decran=50}
\setlength{\columnseprule}{1pt}
\centerline{
\begin{pspicture}(-5,-5)(5,5)
\psframe(-5,-5)(5,5)
\psset{unit=0.92}
\psSolid[object=calottesphere,r=3,ngrid=16 18,
   fillcolor=cyan!50,incolor=yellow,theta=45,phi=-30,hollow,RotY=-80]%
\axesIIID(0,3,3)(6,5,4)
\end{pspicture}}
\begin{verbatim}
\psSolid[object=calottesphere,r=3,
         ngrid=16 18,
         fillcolor=cyan!50,incolor=yellow,
         theta=45,phi=-30,hollow,RotY=-60]%
\end{verbatim}
\columnbreak
\centerline{
\begin{pspicture}(-5,-3)(5,7)
\psframe(-5,-3)(5,7)
\psSolid[object=grille,base=-5 5 -5 5,action=draw]%
\psSolid[object=calottesphere,r=3,ngrid=16 18,
   fillcolor=cyan!50,incolor=yellow,theta=45,phi=-30](0,0,1.5)%
\axesIIID(3,3,3.6)(6,6,5)
\end{pspicture}}
\begin{verbatim}
\psSolid[object=calottesphere,r=3,
         ngrid=16 18,fillcolor=cyan!50,
         incolor=yellow,theta=45,phi=-30]
         (0,0,1.5)
\end{verbatim}
\end{multicols}