Graphics Reference
In-Depth Information
Unit vectors are extremely useful when we come to vector multiplication. As
we shall discover later, multiplication of vectors involves taking their magni-
tude, and if this is unity, the multiplication is greatly simplified. Furthermore,
in computer graphics applications vectors are used to specify the orientation
of surfaces, the direction of light sources and the virtual camera. Again, if
these vectors have a unit length, the computation time associated with vector
operations can be minimized.
Converting a vector into a unit form is called normalizing and is achieved
by dividing a vector's components by its magnitude. To formalize this process,
co nsider a vec tor r whose components are x , y , z . The magnitude
||
r
||
=
x 2 + y 2 + z 2 and the unit form of r are given by
x
y
z
1
r u =
(6.10)
||
r
||
This process can be confirmed by showing that the magnitude of r u is 1:
x
2
+ y
2
+ z
2
||
r u ||
=
r
r
r
x 2 + y 2 + z 2 =1
1
|| r ||
=
To put this into context, consider the conversion of r into a unit form:
1
2
3
r =
= 1 2 +2 2 +3 2 = 14
|| r ||
1
2
3
0 . 267
0 . 535
0 . 802
1
14
=
r u =
6.2.6 Cartesian Vectors
Now that we have considered the scalar multiplication of vectors, vector ad-
dition and unit vectors, we can combine all three to permit the algebraic
manipulation of vectors. To begin with, we will define three Cartesian unit
vectors i , j , k that are aligned with the x -, y -and z -axes respectively:
1
0
0
0
1
0
0
0
1
,
,
i =
j =
k =
(6.11)
Therefore any vector aligned with the x-, y- or z -axes can be defined by a scalar
multiple of the unit vectors i , j and k respectively. For example, a vector 10
 
Search WWH ::




Custom Search