Graphics Reference
In-Depth Information
v
v
obtuse
right angle
acute
v
u v < 0
u v = 0
u v > 0
u
u
u
(a)
(b)
(c)
Figure 3.4 The sign of the dot product of two vectors tells whether the angle between the
vectors is (a) obtuse, (b) at a right angle, or (c) acute.
angle is an extremely useful property of the dot product, which is frequently used in
various geometric tests.
Geometrically, the dot product can be seen as the projection of v onto u , returning
the signed distance d of v along u in units of
u
:
·
u
v
=
d
.
u
This projection is illustrated in Figure 3.5a. Given vectors u and v , v can there-
fore be decomposed into a vector p parallel to u and a vector q perpendicular to u ,
such that v
=
+
p
q :
u
·
v
u
u
·
v
u
·
v
p
=
=
2 u
=
u u , and
u
u
u
·
u
u
·
v
q
=
v
p
=
v
u u .
u
·
Figure 3.5b shows how v is decomposed into p and q .
Note that because the dot product is commutative the same holds true for seeing
it as the projection of u onto v , returning the distance of u along v in units of
v
.
3.3.4 Algebraic Identities Involving Dot Products
Given scalars r and s and vectors u and v , the following identities hold for the dot
product:
·
=
+
+···+
u
v
u 1 v 1
u 2 v 2
u n v n
 
Search WWH ::




Custom Search