Game Development Reference
In-Depth Information
Figure 1.2. Vector scaling and addition.
shows the relationship between points and vectors—in this case, the vector is
acting as the difference between two points. Algebraically, this is
v = x 1
x 0
or
x 1 = x 0 + v .
In general, vectors can be scaled and added. Scaling (multiplying by a single
factor, or scalar) changes the length of a vector. If the scalar is negative, it can
also change the direction of the vector. Adding two vectors together creates a new
vector that points from the tail of one to the head of another (see Figure 1.2 ).
Scaling and adding together an arbitrary number of vectors is called a linear
combination :
v =
i
a i v i .
A set of vectors v is linearly dependent if one of the vectors in S can be repre-
sented as the linear combination of other members in S .Otherwise,itisa linearly
independent set.
Points cannot be generally scaled or added. They can only be subtracted to
create a vector or combined in a linear combination, where
a i =1 .
i
This is known as an affine combination . We can express an affine combination as
follows:
x = 1
x n +
n− 1
n− 1
a i
a i x i
i
i