Game Development Reference
In-Depth Information
out of the dot product, as it is fundamental to almost every aspect of 3D
math. Because of its supreme importance, we're going to dwell on it a bit.
We'll discuss two slightly different ways of thinking about this operation
geometrically; since they are really equivalent, you may or may not think
one interpretation or the other is “more fundamental,” or perhaps you may
think we are being redundant and wasting your time. You might especially
think this if you already have some exposure to the dot product, but please
indulge us.
The first geometric definition to present is perhaps the less common of
the two, but in agreement with the advice of Dray and Manogue [15], we
believe it's actually the more useful. The interpretation we first consider is
that of the dot product performing a projection.
Assume for the moment that a is a unit vector, and b is a vector of any
length. Now take b and project it onto a line parallel to a , as in Figure 2.17.
Figure 2.17
The dot product as a projection
(Remember that vectors are displacements and do not have a fixed position,
so we are free to move them around on a diagram anywhere we wish.) We
can define the dot product a b as the signed length of the projection of b
onto this line. The term “projection” has a few different technical meanings
(see Section 5.3) and we won't bother attempting a formal definition here. 8
You can think of the projection of b onto a as the “shadow” that b casts
on a when the rays of light are perpendicular to a .
We have drawn the projections as arrows, but remember that the result
of a dot product is a scalar, not a vector. Still, when you first learned about
negative numbers, your teacher probably depicted numbers as arrows on a
number line, to emphasize their sign, just as we have. After all, a scalar is
a perfectly valid one-dimensional vector.
What does it mean for the dot product to measure a signed length?
It means the value will be negative when the projection of b points in
the opposite direction from a , and the projection has zero length (it is a
single point) when a and b are perpendicular. These cases are illustrated
in Figure 2.18.
8 Thus shirking our traditional duties as mathematics authors to make intuitive con-
cepts sound much more complicated than they are.
Search WWH ::




Custom Search