1 \section{Defining a \Index{projection plane}}
3 The \Index{plane} of projection is defined with the option
4 \texttt{\Lkeyword{plan}=plantype} which expects an argument \textit{type of
5 plane}. The creation of such an argument invariably happens
6 through the command \verb+\psSolid[object=plan]+ (see the relevant
7 paragraph of chapter 4 and the example below in sub-paragraph
8 \textit{Labels\/} of the paragraph \textit{Points}).
11 \section{Specifying a general projection plane}
13 To define a plane of projection, we assume that the drawing to be
14 projected resides on the plane $Oxy$, and the user has to specify
15 the images of the origin $O$ and the basis $\overrightarrow{\imath}$,
16 $\overrightarrow{\jmath}$, and $\overrightarrow{k}$.
17 If they wish to abbreviate the syntax, users are required at most
18 to specify the image of $O$ and the image of $\overrightarrow{k}$,
19 in other words the image of the origin and the components of the
20 normal to the plane of projection.
22 The package then suggests an orientation of the plane of
23 projection. If users are not happy with this orientation, they can
24 specify it themselves.
26 The following paragraphs detail the proposed syntax.
29 \subsection{The origin}
31 \texttt{(x,y,z)} are the projected coordinates of the origin of
32 the plane, which are either numerical values or expressions that
33 PostScript can handle.
36 \texttt{\textbackslash psProjection[\ldots](1,2,3)} positions the
37 origin of the plane at the coordinates $(1,2,3)$.
40 \texttt{\textbackslash psProjection[\ldots](0.5 0.5 add,2 sqrt,1.5 2
41 exp)} positions the origin of the plane at the coordinates
45 If no coordinates are chosen (by the end of the command), it is
46 interpreted as $(0,0,0)$, placing the origin at $O$.
49 \subsection{Defining the normal to a plane}
51 There are four ways to define a normal to a plane, two of which
52 have an option to rotate the coordinate system of the plane around
53 that normal: \Lkeyword{normal}
55 \subsubsection{Method 1: giving the components of the normal vector}
58 In this case \texttt{\Lkeyword{normal}=nx ny nz}, the argument consists of
59 3 values: the components of the normal vector. For example
60 \texttt{\Lkeyword{normal}=0 0 1} for the plane $Oxy$.
64 \begin{LTXexample}[width=6.5cm]
66 \begin{pspicture}(-9,-6.5)(6,6)
67 \psframe*[linecolor=blue!50](-6,-6)(6,6)
68 \psset{lightsrc=10 -20 50,viewpoint=50 20 30 rtp2xyz,Decran=50}
69 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
70 \psSolid[object=grille,base=-4 4 -4 4]}
71 \defFunction[algebraic]{f1}(x){3*cos(x)}{3*sin(x)}{}
72 \psProjection[object=courbeR2,
77 \axesIIID(0,0,0)(4,4,4)
78 \psProjection[object=chemin,
86 \psframebox[linecolor=blue!50]
87 {\texttt{$\backslash${}defFunction[algebraic]%
88 \{f\}(x)\{3*cos(x)\}\{3*sin(x)\}\{\}}}}
94 $\big(\overrightarrow{i}(1,0,0),\overrightarrow{j}(0,1,0),\overrightarrow{k}(0,0,1)\big)$
95 the basis of the referencing coordinate system and if
96 $\big(\overrightarrow{I},\overrightarrow{J},\overrightarrow{K}\big)$
97 is the basis of the coordinate system of the plane to be defined,
98 with $\overrightarrow{K}$ being the chosen normal vector, then the
99 following relations are verified and should be kept in mind:
101 \item $\overrightarrow{J}=\overrightarrow{K}\wedge \overrightarrow{i}$
102 \item $\overrightarrow{I}=\overrightarrow{J}\wedge \overrightarrow{K}$
104 If $\overrightarrow{K}=\overrightarrow{i}$ then
105 $\overrightarrow{J}=\overrightarrow{j}$
107 \encadre{With the convention: $\overrightarrow{K}$ is drawn in
108 red, $\overrightarrow{J}$ in blue and $\overrightarrow{I}$ in green.} %$
111 \begin{minipage}{0.27\linewidth}
113 \centerline{\texttt{[normal=0 0 1]}}
115 \begin{pspicture}(-6,-6)(4,7)%
116 \psframe*[linecolor=blue!50](-6,-6)(6,6)
117 \psset{lightsrc=10 -20 50,viewpoint=50 20 30 rtp2xyz,Decran=60}
118 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
119 \psSolid[object=grille,base=-4 4 -4 4]}
120 \axesIIID(0,0,0)(4,4,4)
121 \psProjection[object=chemin,
128 \psProjection[object=chemin,
135 \psProjection[object=chemin,
145 \begin{minipage}{0.27\linewidth}
147 \centerline{\texttt{[normal=1 0 0]}}
149 \begin{pspicture}(-6,-6)(4,7)
150 \psframe*[linecolor=blue!50](-6,-6)(6,6)
151 \psset{lightsrc=50 20 30,viewpoint=50 20 30,Decran=70}
152 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
153 \psSolid[object=grille,base=-4 4 -4 4,RotY=90]}
154 \axesIIID(0,0,0)(4,4,4)
155 \psProjection[object=chemin,
162 \psProjection[object=chemin,
169 \psProjection[object=chemin,
179 \begin{minipage}{0.27\linewidth}
182 \centerline{\texttt{[normal=0 1 0]}}
184 \begin{pspicture}(-6,-6)(4,7)
185 \psframe*[linecolor=blue!50](-6,-6)(6,6)
186 \psset{lightsrc=50 60 30,viewpoint=50 60 30,Decran=70}
187 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
188 \psSolid[object=grille,base=-4 4 -4 4,RotX=-90]}
189 \axesIIID(0,0,0)(4,4,4)
190 \psProjection[object=chemin,
198 \psProjection[object=chemin,
206 \psProjection[object=chemin,
219 \begin{minipage}{0.27\linewidth}
221 \centerline{\texttt{[normal=1 0 1]}}
223 \begin{pspicture}(-6,-6)(4,7)%
224 \psframe*[linecolor=blue!50](-6,-6)(6,6)
225 \psset{lightsrc=50 20 20,viewpoint=50 20 20,Decran=70}
226 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
227 \psSolid[object=grille,base=-4 4 -4 4]
228 \psSolid[object=grille,base=-4 0 -4 4,RotY=90]
229 \psSolid[object=grille,base=-2 2 -4 4,RotY=45,linecolor=red](1.414,0,1.414)}
230 \psPoint(2,0,2){O1}%\psdot(O1)
231 \axesIIID(2.8,3,2.8)(4,4,4)
232 \psPoint(1.414,0,1.414){O1}\psPoint(2.414,0,2.414){OK}
233 \psline[linewidth=.2,linecolor=red](O1)(OK)
234 \psProjection[object=chemin,
241 0 1 slineto](1.414,0,1.414)
242 \psProjection[object=chemin,
249 1 0 slineto](1.414,0,1.414)
253 \begin{minipage}{0.27\linewidth}
255 \centerline{\texttt{[normal=0 1 1]}}
257 \begin{pspicture}(-6,-6)(4,7)%
258 \psframe*[linecolor=blue!50](-6,-6)(6,6)
259 \psset{lightsrc=30 20 20,viewpoint=30 20 20,Decran=45}
260 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
261 \psSolid[object=grille,base=-4 4 -4 4]
262 \psSolid[object=grille,base=-4 0 -4 4,RotY=90,RotZ=90]
263 \psSolid[object=grille,base=-4 4 -2 2,RotX=-45,linecolor=red](0,1.414,1.414)}
264 \axesIIID(2.8,3,2.8)(4,4,4)
265 \psPoint(0,1.414,1.414){O1}\psPoint(0,2.414,2.414){OK}
266 \psline[linewidth=.2,linecolor=red](O1)(OK)
267 \psProjection[object=chemin,
274 0 1 slineto](0,1.414,1.414)
275 \psProjection[object=chemin,
282 1 0 slineto](0,1.414,1.414)
286 \begin{minipage}{0.27\linewidth}
288 \centerline{\texttt{[normal=1 1 0]}}
290 \begin{pspicture}(-6,-6)(4,7)%
291 \psframe*[linecolor=blue!50](-6,-6)(6,6)
292 \psset{lightsrc=30 20 20,viewpoint=30 20 20,Decran=45}
293 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
294 \psSolid[object=grille,base=0 2 -4 4,RotY=90,RotZ=45,linecolor=red]
296 \psSolid[object=grille,base=-4 4 -4 4]
297 \psSolid[object=grille,base= -2 0 -4 4,RotY=90,RotZ=45,linecolor=red]
299 \axesIIID(2.8,2.8,1)(4,4,4)
300 \psPoint(1.414,1.414,0){O1}\psPoint(2.414,2.414,0){OK}
301 \psline[linewidth=.2,linecolor=red](O1)(OK)
302 \psProjection[object=chemin,
309 0 1 slineto](1.414,1.414,0)
310 \psProjection[object=chemin,
317 1 0 slineto](1.414,1.414,0)
325 \subsubsection{Method 2: giving the components of the normal vector and an angle
328 In this case \texttt{\Lkeyword{normal}=nx ny nz A}, the argument takes four
329 values: the components of the normal vector and the angle of
330 rotation (in degrees) around that axis.
333 \begin{minipage}{0.34\linewidth}
335 \centerline{\texttt{[normal=1 0 1]}}
337 \begin{pspicture}(-6,-6)(6,7)%
338 \psframe*[linecolor=blue!50](-6,-6)(6,6)
339 \psset{lightsrc=50 20 20,viewpoint=50 20 20,Decran=70}
340 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
341 \psSolid[object=grille,base=-4 4 -4 4]
342 \psSolid[object=grille,base=-4 0 -4 4,RotY=90]
343 \psSolid[object=grille,base=-2 2 -4 4,RotY=45,linecolor=red](1.414,0,1.414)}
344 \psPoint(2,0,2){O1}%\psdot(O1)
345 \axesIIID(2.8,3,2.8)(4,4,4)
346 \psPoint(1.414,0,1.414){O1}\psPoint(2.414,0,2.414){OK}
347 \psline[linewidth=.2,linecolor=red](O1)(OK)
348 \psProjection[object=chemin,
355 0 1 slineto](1.414,0,1.414)
356 \psProjection[object=chemin,
363 1 0 slineto](1.414,0,1.414)
364 \defFunction[algebraic]{fonction}(x){cos(x)}{x}{}
365 \psProjection[object=courbeR2,
368 function=fonction](1.414,0,1.414)
372 \begin{minipage}{0.34\linewidth}
374 \centerline{\texttt{[normal=1 0 1 45]}}
376 \begin{pspicture}(-6,-6)(6,7)%
377 \psframe*[linecolor=blue!50](-6,-6)(6,6)
378 \psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70}
379 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
380 \psSolid[object=grille,base=-4 4 -4 4,action=draw]
381 \psSolid[object=grille,base=-4 4 -4 4,RotY=90,action=draw]}
382 \axesIIID(0,0,0)(4,4,4)
383 \psPoint(1.414,0,1.414){O1}\psPoint(2.414,0,2.414){OK}
384 \psline[linewidth=.2,linecolor=red](O1)(OK)
385 \psProjection[object=chemin,
397 \psProjection[object=chemin,
404 0 1 slineto](1.414,0,1.414)
405 \psProjection[object=chemin,
412 1 0 slineto](1.414,0,1.414)
413 \defFunction[algebraic]{fonction}(x){cos(x)}{x}{}
414 \psProjection[object=courbeR2,
417 function=fonction](1.414,0,1.414)
423 In the second figure, the normal (represented in red) is identical
424 to the one in the first figure, but the plane is rotated 45
425 degrees around that normal.
428 \subsubsection{Method 3: defining the normal by the images of \textit{i}
431 In this case \texttt{\Lkeyword{normal}=ix iy iz kx ky kz}, the argument
432 takes six values: the components of the images of
433 $\overrightarrow{i}$ and $\overrightarrow{k}$, with:
434 $\overrightarrow{J}=\overrightarrow{K}\wedge \overrightarrow{I}$.
437 \begin{minipage}{0.34\linewidth}
439 \centerline{\texttt{[normal=0 1 0 1 0 0]}}
441 \begin{pspicture}(-6,-6)(6,7)%
442 \psframe*[linecolor=blue!50](-6,-6)(6,6)
443 \psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70}
444 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
445 \psSolid[object=grille,base=-4 4 -4 4]%
446 \psSolid[object=grille,base=-4 4 -4 4,action=draw,RotX=90,RotZ=90]}%
447 \defFunction[algebraic]{fonction}(x){x}{x*sin(x)}{}
448 \axesIIID(0,0,0)(4,4,4)
449 \psProjection[object=chemin,
457 \psProjection[object=chemin,
465 \psProjection[object=chemin,
473 \psProjection[object=courbeR2,
481 \begin{minipage}{0.34\linewidth}
483 \centerline{\texttt{[normal=-1 1 0 1 1 2 ]}}
485 \begin{pspicture}(-6,-6)(6,7)%
486 \psframe*[linecolor=blue!50](-6,-6)(6,6)
487 \psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70}
488 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
489 \psSolid[object=grille,base=-4 4 -4 4]}%
490 \defFunction[algebraic]{fonction}(x){x}{x*sin(x)}{}
491 \axesIIID(0,0,0)(4,4,4)
492 \psProjection[object=chemin,
495 normal=-1 1 0 1 1 2 ,
500 \psProjection[object=chemin,
503 normal=-1 1 0 1 1 2 ,
508 \psPoint(0,0,0){O}\psPoint(0.4,0.4,0.8){K}
509 \psline[linewidth=.1,linecolor=red](O)(K)
510 \psProjection[object=courbeR2,
512 linecolor={[cmyk]{1,0,1,0.5}},
513 normal=-1 1 0 1 1 2 ,
515 \psProjection[object=chemin,
532 \subsubsection{Method 4: defining the normal by the images of
533 \textit{i}, \textit{k} and an angle of rotation}
535 In this case \texttt{\Lkeyword{normal}=ix iy iz kx ky kz phi}, the argument
536 takes seven values: the components of the images of
537 $\overrightarrow{i}$, $\overrightarrow{k}$ and the angle of
538 rotation (in degrees) around the normal, with:
539 $\overrightarrow{J}=\overrightarrow{K}\wedge \overrightarrow{I}$.
542 \begin{minipage}{0.34\linewidth}
544 \centerline{\texttt{[normal=0 1 0 1 0 0 90]}}
546 \begin{pspicture}(-6,-6)(6,7)%
547 \psframe*[linecolor=blue!50](-6,-6)(6,6)
548 \psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70}
549 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
550 \psSolid[object=grille,base=-4 4 -4 4]%
551 \psSolid[object=grille,base=-4 4 -4 4,action=draw,RotX=90,RotZ=90]}%
552 \defFunction[algebraic]{fonction}(x){x}{x*sin(x)}{}
553 \axesIIID(0,0,0)(4,4,4)
554 \psProjection[object=chemin,
557 normal=0 1 0 1 0 0 90,
561 \psProjection[object=chemin,
564 normal=0 1 0 1 0 0 90,
568 \psProjection[object=chemin,
575 \psProjection[object=courbeR2,
578 normal=0 1 0 1 0 0 90,
583 \begin{minipage}{0.34\linewidth}
585 \centerline{\texttt{[normal=-1 1 0 1 1 2 90]}}
587 \begin{pspicture}(-6,-6)(6,7)%
588 \psframe*[linecolor=blue!50](-6,-6)(6,6)
589 \psset{lightsrc=50 20 20,viewpoint=50 30 20,Decran=70}
590 {\psset{linewidth=0.5\pslinewidth,linecolor=gray}
591 \psSolid[object=grille,base=-4 4 -4 4]}%
592 \defFunction[algebraic]{fonction}(x){x}{x*sin(x)}{}
593 \axesIIID(0,0,0)(4,4,4)
594 \psProjection[object=chemin,
597 normal=-1 1 0 1 1 2 90,
601 \psProjection[object=chemin,
604 normal=-1 1 0 1 1 2 90,
608 \psPoint(0,0,0){O}\psPoint(0.4,0.4,0.8){K}
609 \psline[linewidth=.1,linecolor=red](O)(K)
610 \psProjection[object=courbeR2,
612 linecolor={[cmyk]{1,0,1,0.5}},
613 normal=-1 1 0 1 1 2 90,
615 \psProjection[object=chemin,