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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
|
\section{The object \texttt{plan}}
\subsection{Presentation: type \texttt{plan\/} and type \texttt{solid} }
The object
\Lkeyval{plan} is special in
\texttt{pst-solides3d}. However, all the objects presented until now have had a common structure:
they are of type \verb+solid+: in other words, they are defined by a list of vertices, faces and colours.
For many applications, it is necessary to have some additional information for a \Index{plane}: an origin, an
orientation, a reference base etc.
To fulfill all these requirements, another
data structure of type \Lkeyval{plan} was created, which allows one to save all this necessary information. These manipulations of the plane will be controlled
by such an object.
Only when rendering takes place will an object of type \Lkeyval{plan} be converted to an object of type \verb+solid+ which conforms to the macro \Lcs{psSolid}.
An object of type \Lkeyval{plan} is used to describe an oriented affine plane.
For a complete definition of such an object,
an origin
$I$, a basis $(\vec u, \vec v)$ for that plane, a scaling of the axis $(I, \vec u)$ and a scaling of the axis
$(I, \vec v)$ are needed.
In addition, we can specify the fineness of the grid---in other words, the number of faces---used to represent that portion of the affine plane
while transforming in an object of the type \verb+solid+.%I'm confused by this last phrase.
This type of object can be used to define planes of section; it is then necessary to define a plane for projection.%check if this keeps your sense
Its usage is quite easy to understand for users of PSTricks.
The only thing that you need to know is that, if we manipulate a
\texttt{\Lkeyword{object}=\Lkeyval{plan}} with the macro \Lcs{psSolid}, we manipulate two objects at the same time: one of type \Lkeyval{plan} and
the other of type \verb+solid+. When we select a backup
of that object (see chapter ``\textit{Advanced usage}'') with the name $monplan$ for example with the option \texttt{\Lkeyword{name}=monplan}, there are
in fact 2 backups that are effected.
The first, with the name \texttt{monplan}, is an object of type \Lkeyval{plan}, and the second, with the name \texttt{monplan\_s}, is an object of type \verb+solid+.
\subsection{Defining an oriented plane}
To generate such an object, one uses \texttt{\Lkeyword{object}=\Lkeyval{plan}} which comes with a few arguments:
\begin{itemize}
\item \Lkeyword{definition} which specifies the method to defining the plane.
\item \Lkeyword{args} which specifies the necessary arguments for the method chosen.
\item \texttt{\Lkeyword{base}=$xmin$ $xmax$ $ymin$ $ymax$} which specifies the dimensions of each axis.
\item \verb+[phi]+ (value $0$ by default) which specifies the angle of rotation (in degrees) of the plane around its normal.
\end{itemize}
\subsection{Special options}
The object \verb+plan+ comes with some special options for viewing:
\begin{itemize}
\item \Lkeyword{planmarks} which shows axes and scaling (with ticks),
\item \Lkeyword{plangrid} which shows the grid,
\item \Lkeyword{showbase} which shows the basis vectors for the plane, and
\item \Lkeyword{showBase} (note the capital letters) which shows the basis vectors of the plane
and draws the associated normal vector.
\end{itemize}
These options apply regardless of the method of definition of the plane.
\begin{center}
\psset{unit=0.4}
\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,fontsize=10}
\begin{pspicture*}(-5,-4)(6,4)
\psframe(-5,-4)(5,3)
\psSolid[object=plan,
definition=equation,
args={[0 0 1 0]},
fillcolor=Aquamarine,
base=-2.2 2.2 -3.2 3.2]
\end{pspicture*}
%%
\psset{unit=1}
\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,fontsize=10}
\begin{pspicture*}(-5,-4)(6,4)
\psframe(-5,-4)(5,3)
\psSolid[object=plan,
definition=equation,
args={[0 0 1 0]},
fillcolor=Aquamarine,
base=-2.2 2.2 -3.2 3.2,
planmarks]
\end{pspicture*}
%%
\psset{unit=1}
\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,fontsize=10}
\begin{pspicture*}(-5,-4)(6,4)
\psframe(-5,-4)(5,3)
\psSolid[object=plan,
definition=equation,
args={[0 0 1 0]},
fillcolor=Aquamarine,
base=-2.2 2.2 -3.2 3.2,
plangrid]
\end{pspicture*}
%%
\psset{unit=1}
\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,fontsize=10}
\begin{pspicture*}(-5,-4)(6,4)
\psframe(-5,-4)(5,3)
\psSolid[object=plan,
definition=equation,
args={[0 0 1 0]},
fillcolor=Aquamarine,
base=-2.2 2.2 -3.2 3.2,
showbase]
\end{pspicture*}
%%
\psset{unit=1}
\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,fontsize=10}
\begin{pspicture*}(-5,-4)(6,4)
\psframe(-5,-4)(5,3)
\psSolid[object=plan,
definition=equation,
args={[0 0 1 0]},
fillcolor=Aquamarine,
base=-2.2 2.2 -3.2 3.2,
showBase]
\end{pspicture*}
%%
\psset{unit=1}
\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,fontsize=10}
\begin{pspicture*}(-5,-4)(6,4)
\psframe(-5,-4)(5,3)
\psSolid[object=plan,
definition=equation,
args={[0 0 1 0]},
fillcolor=Aquamarine,
base=-2.2 2.2 -3.2 3.2,
plangrid,
showBase,
action=none
]
\end{pspicture*}
\end{center}
These options can be used, even if the plane is not drawn.
\subsection{Defining a plane with a cartesian equation}
The \textit{cartesian equation} of a plane is of the form
\[
ax+by+cz+d=0
\]
The coefficients $a$, $b$, $c$ and $d$ determine an affine plane.
\subsubsection{Usage with default orientation and origin}
To define an affine plane, we can use
\texttt{\Lkeyword{definition}=\Lkeyval{equation}}, and \texttt{\Lkeyword{args}=\{[$a$ $b$ $c$
$d$]\}}. The orientation and origin of the affine plane must be given.
For example, the quadruple $(a, b, c, d) = (0, 0, 1, 0)$ determines
the plane with the equation $z=0$:
\begin{LTXexample}[width=6.5cm]
\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,
fontsize=10,unit=0.65}
\begin{pspicture*}(-5,-4)(5,4)
\psSolid[object=plan,
definition=equation,
args={[0 0 1 0]},
fillcolor=Aquamarine,
planmarks,
base=-2.2 2.2 -3.2 3.2,
showbase]
\axesIIID(0,0,0)(2.2,3.2,4)
\end{pspicture*}
\end{LTXexample}
The parameter \texttt{\Lkeyword{base}=$xmin$ $xmax$ $ymin$ $ymax$} specifies the extent along each axis.
\subsubsection{Specifying the origin}
The parameter \texttt{\Lkeyword{origine}=$x_0$ $y_0$ $z_0$} specifies
the origin of the affine plane.
If the chosen point $(x_0, y_0, z_0)$ doesn't fit the equation of the plane, it will be ignored.% The meaning of this is unclear to me.
For example, a plane with the equation $z=0$ for which $(1, 2, 0)$ has been chosen as a possible origin:%(finish the sentence---it does what?)
\begin{LTXexample}[width=6.5cm]
\psset{viewpoint=10 18 60 rtp2xyz,Decran=10,
fontsize=10,unit=0.65cm}
\begin{pspicture*}(-4,-5.5)(6,4)
\psSolid[object=plan,
definition=equation,
args={[0 0 1 0]},
fillcolor=Aquamarine,
origine=1 2 0,
base=-2.2 2.2 -3.2 3.2,
planmarks]
\axesIIID(0,0,0)(2.2,3.2,4)
\end{pspicture*}
\end{LTXexample}
\subsubsection{Specifying the orientation}
If the chosen orientation is unsatisfactory,
we can specify an angle of rotation $\alpha $ (in degrees) around the normal of the plane with the syntax
\texttt{\Lkeyword{args}=\{[a b c d] $\alpha $\}}.
\begin{LTXexample}[width=6.5cm]
\psset{viewpoint=10 18 60 rtp2xyz,
Decran=10,fontsize=10,unit=0.65cm}
\begin{pspicture*}(-5,-4)(5,4)
\psSolid[object=plan,
definition=equation,
args={[0 0 1 0] 90},
fillcolor=Aquamarine,
base=-2.2 2.2 -3.2 3.2,
planmarks]
\axesIIID(0,0,0)(3.2,2.2,4)
\end{pspicture*}
\end{LTXexample}
\subsection{Defining a plane using a normal vector and a point}
It is also possible to define a plane by giving a point and a normal vector.
In this case one uses the parameter \texttt{\Lkeyword{definition}=\Lkeyval{normalpoint}}.
If wanted, we can specify the orientation, but it can be omitted.
\subsubsection{First Method: orientation Unspecified}
We use \texttt{\Lkeyword{args}=\{$x_0$ $y_0$ $z_0$ [$a$ $b$ $c$]\}} where $(x_0,
y_0, z_0)$ is the origin of the affine plane, and $(a, b, c)$ is a vector normal to that plane.
\begin{LTXexample}[width=6.5cm]
\psset{viewpoint=10 18 60 rtp2xyz,
Decran=10,fontsize=10,unit=0.65cm}
\begin{pspicture*}(-5,-4)(5,4)
\psSolid[object=plan,
definition=normalpoint,
args={0 0 0 [0 0 1]},
fillcolor=Aquamarine,
planmarks,
base=-2.2 2.2 -3.2 3.2,
showbase]
\axesIIID(0,0,0)(2.2,3.2,4)
\end{pspicture*}
\end{LTXexample}
\subsubsection{Second Method: Specifying an angle of rotation}
We use \texttt{\Lkeyword{args}=\{$x_0$ $y_0$ $z_0$ [$a$ $b$ $c$ $\alpha
$]\}} where $(x_0, y_0, z_0)$ is the origin of the affine plane, $(a, b,
c)$ a normal vector of that plane, and $\alpha $ the angle of rotation (in
degrees) around the normal vector of that plane.
\begin{LTXexample}[width=6.5cm]
\psset{viewpoint=10 18 60 rtp2xyz,
Decran=10,fontsize=10,unit=0.65}
\begin{pspicture*}(-5,-4)(5,4)
\psSolid[object=plan,
definition=normalpoint,
args={0 0 0 [0 0 1 45]},
fillcolor=Aquamarine,
planmarks,
base=-2.2 2.2 -3.2 3.2,
showbase]
\axesIIID(0,0,0)(2.2,3.2,4)
\end{pspicture*}
\end{LTXexample}
\subsubsection{Third Method: Specifying the first basis vector}
We use \texttt{\Lkeyword{args}=\{$x_0$ $y_0$ $z_0$ [$u_x$ $u_y$ $u_z$ $a$ $b$
$c$ ]\}} where $(x_0, y_0, z_0)$ is the origin of the affine plane,
$(a, b, c)$ a normal vector of that plane, and $(u_x, u_y, u_z)$ the first basis vector for that plane.
\begin{LTXexample}[width=6.5cm]
\psset{viewpoint=10 18 60 rtp2xyz,
Decran=10,fontsize=10,unit=0.65cm}
\begin{pspicture*}(-5,-4)(5,4)
\psSolid[object=plan,
definition=normalpoint,
args={0 0 0 [1 1 0 0 0 1]},
fillcolor=Aquamarine,
planmarks,
base=-2.2 2.2 -3.2 3.2,
showbase,
]
\axesIIID(0,0,0)(2.2,3.2,4)
\end{pspicture*}
\end{LTXexample}
\subsubsection{Fourth Method: Specifying the first basis vector and an angle of rotation}
We use \texttt{\Lkeyword{args}=\{$x_0$ $y_0$ $z_0$ [$u_x$ $u_y$ $u_z$ $a$ $b$
$c$ $\alpha $]\}} where $(x_0, y_0, z_0)$ is the origin of the affine plane,
$(a, b, c)$ is a normal vector of that plane, $(u_x, u_y, u_z)$ is the first basis vector for that plane and $\alpha $ (in degrees) is a rotation around the axis of the normal vector.
\begin{LTXexample}[width=6.5cm]
\psset{viewpoint=10 18 60 rtp2xyz,
Decran=10,fontsize=10,unit=0.65cm}
\begin{pspicture*}(-5,-4)(5,4)
\psSolid[object=plan,
definition=normalpoint,
args={0 0 0 [1 1 0 0 0 1 45]},
fillcolor=Aquamarine,
planmarks,
base=-2.2 2.2 -3.2 3.2,
showbase]
\axesIIID(0,0,0)(2.2,3.2,4)
\end{pspicture*}
\end{LTXexample}
\subsection{Defining a plane from a face of a solid}
We use \texttt{\texttt{\Lkeyword{definition}=\Lkeyval{solidface}}} with the arguments
\texttt{\texttt{\Lkeyword{args}=$name$ $i$}} where $name$ is the name of the designated solid and
$i$ is the index of the face. The origin is taken as the centre of the chosen face.
In the example below, the plane is defined through the face with the index 0 from the cube named $A$.
\begin{LTXexample}[width=6.5cm]
\psset{viewpoint=10 18 20 rtp2xyz,Decran=8}
\begin{pspicture}(-3.5,-2)(3,2.5)
\psset{solidmemory}
\psSolid[object=cube,a=2,fontsize=20,numfaces=all,name=A]
\psSolid[object=plan,
definition=solidface,
args=A 0,
showBase]
\end{pspicture}
\end{LTXexample}
If the user specifies the coordinates $(x, y, z)$ within the macro
\verb+\psSolid[...](+$x,y,z$\verb+)+, a plane is generated parallel to the face with index $i$ of the solid $name$, and translated to the point $(x, y, z)$ which now is taken as the origin.
\begin{LTXexample}[width=6.5cm]
\psset{viewpoint=10 18 20 rtp2xyz,Decran=8}
\begin{pspicture}(-3.5,-1.5)(3,3)
\psset{solidmemory}
\psSolid[object=cube,a=2,fontsize=20,numfaces=all,name=A]
\psSolid[object=plan,
definition=solidface,
args=A 0,
showBase](0,0,2)
\end{pspicture}
\end{LTXexample}
\endinput
|