Graphics Reference
In-Depth Information
6.2.12 The Vector Product
As mentioned above, there are two ways to obtain the product of two vectors.
The first is the scalar product, and the second is the vector product ,whichis
also called the cross product because of the '
' symbol used in its notation. It
is based on the definition that two vectors r and s can be multiplied together
to produce a third vector t :
×
r × s = t
(6.23)
where
sin( β ), and β is the angle between r and s .
We will discover that the vector t is normal (90 ) to the plane containing
the vectors r and s . This makes it an ideal way of computing the surface
normal to a polygon. Once again, let's define two vectors and proceed to
multiply them together:
||
t
||
=
||
r
|| · ||
s
||
r = a i + b j + c k
(6.24)
s = d i + e j + f k
(6.25)
r
×
s =( a i + b j + c k )
×
( d i + e j + f k )
= a i ×
( d i + e j + f k )+ b j ×
( d i + e j + f k )+ c k
×
( d i + e j + f k )
r
×
s = ad ( i
×
i )+ ae ( i
×
j )+ af ( i
×
k )+ bd ( j
×
i )+ be ( j
×
j )
+ bf ( j
×
k )+ cd ( k
×
i )+ ce ( k
×
j )+ cf ( k
×
k )
(6.26)
As we found with the dot product, there are two groups of vector terms: those
that reference the same unit vector, and those that reference two different unit
vectors.
Using the definition for the cross product, operations such as ( i × i ), ( j × j )
and ( k × k ) result in a vector whose magnitude is 0. This is because the
angle between the vectors is 0 , and sin(0 ) = 0. Consequently these terms
disappear and we are left with
r
×
s = ae ( i
×
j )+ af ( i
×
k )+ bd ( j
×
i )+ bf ( j
×
k )+ cd ( k
×
i )+ ce ( k
×
j )
(6.27)
The mathematician Sir William Rowan Hamilton struggled for many years
when working on quaternions to resolve the meaning of the above result. What
did the products mean? He assumed that i
×
j = k , j
×
k = i and k
×
i = j , but
he also thought that j
k = j . But this did not work!
One day in 1843, when he was out walking, thinking about this problem, he
thought the impossible: i
×
i = k , k
×
j = i and i
×
×
j = k , but j
×
i =
k , j
×
k = i , but k
×
j =
i ,
and k
j . To his surprise, this worked, but it contradicted
the commutative multiplication law of scalars where 6
×
i = j , but i
×
k =
×
7=7
×
6. We now
Search WWH ::




Custom Search