Game Development Reference
In-Depth Information
()
()
(c)
ab
P
=
a b
P
(
)
(d)
a
PQ
+=+
a
P Q
a
(
)
(e)
ab
+=+
PPP
a
b
Using the associative and commutative properties of the real numbers, these
properties are easily verified through direct computation.
The magnitude of an n -dimensional vector V is a scalar denoted by V and is
given by the formula
n
2
V
=
V
.
(2.6)
i
i
=
1
The magnitude of a vector is also sometimes called the norm or the length of a
vector. A vector having a magnitude of exactly one is said to have unit length , or
may simply be called a unit vector . When V represents a three-dimensional point
or direction, Equation (2.6) can be written as
2
2
2
V
=
VVV
+
+
.
(2.7)
x
y
z
A vector V having at least one nonzero component can be resized to unit
length through multiplication by 1 V . This operation is called normalization and
is used often in 3D graphics. It should be noted that the term to normalize is in no
way related to the term normal vector , which refers to a vector that is perpen-
dicular to a surface at a particular point.
The magnitude function given in Equation (2.6) obeys the following rules.
Theorem 2.2. Given any scalar a and any two vectors P and Q , the following
properties hold.
(a)
P
0
(b)
P
=
if and only if
P
=
0, 0,
, 0
0
(c) a
P
=
a
P
(d)
PQ
+≤ +
P Q
Proof.
(a) This follows from the fact that the radicand in Equation (2.6) is a sum of
squares, which cannot be less than zero.