Graphics Reference
In-Depth Information
vector is as a displacement —it represents an amount by which you must move
to get from one place to another. For example, to get from the point ( 3, 1 ) to the
point ( 5, 0 ) , you must move by 2 in the x -direction and by
1inthe y -direction.
This displacement is represented by the vector 2
1 T . It's exactly the same
as the displacement needed to move from ( 4, 1 ) to ( 6, 0 ) . With this interpretation,
addition of vectors makes sense: You add corresponding terms. And multiplication
by a constant is similarly defined by multiplying each entry by that constant, thus
increasing or decreasing the displacement.
If the word “displacement” is not satisfactory, you can also think of vectors
as “differences between points,” that is, as a description of the amount you would
have to move the first point to reach the second. The same pair of points, moved
to a different location by a shift in x and y , correspond to the same vector, because
the difference between them is unchanged.
7.6.3 Length of a Vector
The length (or norm ) of the vector v , denoted
, is the square ro ot of the sum of
th e s quares of the entries of v .If v = 123 T , then
v
= 1 2 + 2 2 + 3 2 =
14. This corresponds, when we think of v as a displacement, to the distance that
we moved. A vector whose length is 1 is called a unit vector.
You can convert a nonzero vector v to a unit vector, which is called normaliz-
ing it, by dividing it by its length. We write
v
S ( v )= v
/
v
(7.30)
for this, with the letter “S” being chosen for “sphere,” since normalizing a vector
in 3-space amounts to adjusting its length so that its tip lies on the unit sphere.
7.6.4 Vector Operations
We can add vectors and multiply a vector by a constant (called scalar multipli-
cation ); more generally, if we have several vectors v 1 , v 2 ,
...
, v n , and numbers
c 1 , c 2 ,
...
, c n , we can form the linear combination
c 1 v 1 + c 2 v 2 +
...
+ c n v n .
(7.31)
The set of all linear combinations of a single nonzero vector v is the line
containing v (where here we are reverting temporarily to the notion of the vector
v representing the endpoint of an arrow starting at the origin); the set of all linear
combinations of two nonzero vectors v and w is, in general, the plane that contains
both of them. One exception is when one vector is a multiple of the other, in which
case the result is the line containing both.
Aside from addition and multiplication by a constant, there are two other oper-
ations on vectors that we'll often use: dot product and cross product.
7.6.4.1 Cross Product
The cross product is usually defined for pairs of vectors in 3-space as follows:
v x
v y
v z
w x
w y
w z
v y w z
v z w y
×
=
.
v z w x
v x w z
(7.32)
v x w y
v y w x
 
 
 
Search WWH ::




Custom Search