Graphics Reference
In-Depth Information
accept that vectors do not obey all the rules of scalars, which is an interesting
result.
Proceeding, then, with Hamilton's rules, we reduce the cross product terms
of (6.27) to
r
×
s = ae ( k )+ af (
j )+ bd (
k )+ bf ( i )+ cd ( j )+ ce (
i )
=( bf
ce ) i +( cd
af ) j +( ae
bd ) k
(6.28)
We now modify the middle term to create a symmetric result:
r
×
s =( bf
ce ) i
( af
cd ) j +( ae
bd ) k
(6.29)
If this is written in determinant form we get
r × s =
j +
bc
ef
ac
df
ab
de
i
k
(6.30)
where the determinants provide the scalar for each unit vector. We will dis-
cover later that the determinant of a 2
×
2 matrix is the difference between
the products of the diagonal terms.
Although it may not be obvious, there is a simple elegance to this result,
which enables the cross product to be calculated very quickly. To derive the
cross product we write the vectors in the correct sequence. Remember that
r × s does not equal s × r . First take r × s :
r = a i + b j + c k
s = d i + e j + f k
(6.31)
The scalar multiplier for i is ( bf − ec ). This is found by ignoring the i com-
ponents and looking at the scalar multipliers of j and k .
The scalar multiplier for
dc ). This is found by ignoring the j
components and looking at the i and k scalars.
The scalar multiplier for k is ( ae
j is ( af
db ). This is found by ignoring the k
components and looking at the i and j scalars.
Let's illustrate this with some examples. First we confirm that the vector
product works with the unit vectors, i , j and k .
Therefore
i × j =(0
×
0
1
×
0) i
(1
×
0
0
×
0) j +(1
×
1
0
×
0) k
= k
j
×
k =(1
×
1
0
×
0) i
(0
×
1
0
×
0) j +(0
×
0
0
×
1) k
= i
k
×
i =(0
×
0
0
×
1) i
(0
×
0
1
×
1) j +(0
×
0
1
×
0) k
= j
Search WWH ::




Custom Search