Graphics Reference
In-Depth Information
Let's now consider two vectors r and s and compute the normal vector t .
The vectors will be chosen so that we can anticipate approximately the answer.
Figure 6.10 shows the vectors r and s and the normal vector t . Table 6.2
contains the coordinates of the vertices forming the two vectors.
x 3
x 2
x 1
x 2
s =
r =
y 3
y 2
y 1
y 2
z 3
z 2
z 1
z 2
r =
i + j
s =
i + k
r
×
s =(1
×
1
0
×
0) i
(
1
×
1
(
1)
×
0) j
+(
1
×
0
(
1)
×
1) k
= i + j + k
This confirms what we expected from Figure 6.10. Let's now reverse the vec-
tors to illustrate the importance of vector sequence:
s =
i + k
r =
i + j
Y
n 3
r
t
s
n 1
n 2
Z
X
Fig. 6.10. The vector t is normal to the vectors r and s .
Table 6.2. Coordinates of the vertices used
in Fig. 6.10.
Vertex
x
y
z
v 1
0
0
1
v 2
1
0
0
v 3
0
1
0
 
Search WWH ::




Custom Search