Graphics Reference
In-Depth Information
tells “how much v is like w ” in the sense that as v ranges over all displacements
of a fixed length—say, length 1—this function is most positive when v is parallel
to w , most negative when it's a displacement in the direction opposite w , and zero
for displacements that are in directions perpendicular to w .
The dot product is central to much of linear algebra; a surprising number of
computations and simplifications can be done by working with vectors and their
dot products rather than with their coordinates. This often leads to insight into the
underlying operations.
u
7.6.4.3 The Projection of w on v
As an example of the use of dot products, suppose we want to write the displace-
ment w as a sum,
w
v
v
9
w = v + u ,
(7.39)
where v is parallel to v and u is perpendicular to it (see Figure 7.10). How can we
find v ? First, we know it's a multiple s v of v ; all we need to find is s . Consider
the dot product of v with both sides of Equation 7.39:
Figure 7.10: Decomposing a dis-
placement w as a sum of two
displacements, one parallel to a
given vector v and one perpen-
dicular to v .
v + v
v
·
w = v
·
·
u
(7.40)
= v
·
( s v )+ 0
(7.41)
= s ( v
·
v ) , so
(7.42)
s = v
w
v · v .
·
(7.43)
The projection is therefore
v = v
·
w
v v .
(7.44)
v
·
And u is just
v .
u = w
(7.45)
When v is a unit vector, the expression for v simplifies to
v =( v
·
w ) v .
(7.46)
7.6.4.4 Operations on Points and Vectors
With the notion of a vector as a difference between points, or as a displacement,
we can write down a number of operations.
•The difference between points P and Q , denoted by P
Q , is a vector.
•The sum of a point P and a vector v is another point. In particular, P +( Q
P )= Q .
•The sum or difference of vectors is defined by elementwise addition or
subtraction.
•The sum of two points isn't defined at all.
Thus, although for both points and vectors in the plane we represent each with a
pair of real numbers, we use the typographical convention that points are denoted
 
 
Search WWH ::




Custom Search