Graphics Programs Reference
In-Depth Information
Exercise A.1: Show it!
Perhaps the best proof is to construct the cross product from first principles. Given
the two vectors P and Q , we are looking for a vector R perpendicular to both P and Q .
This requirement does not fully define R ,sinceboth R and
R satisfy it and since it
says nothing about the magnitude of R . We therefore extend our definition of the cross
product by requiring that the triplet ( P , Q , R ) be a right-handed triad of vectors and
also that the magnitude of R be the product
|
P
||
Q
|
sin θ ,where θ is the angle between
P and Q .
The derivation exploits the orthogonality of the three coordinate axes i =( 1 , 0 , 0 ),
j =( 0 , 1 , 0 ), and k =( 0 , 0 , 1 ) and also uses our definition. The definition implies that
i
i = 0 because the angle between i and itself is zero, and the same holds for j and k .It
also implies that the cross product of any two of the three basis vectors is a unit vector
because the basis vectors are unit vectors and because sin 90 =1. Oncewerealize
that the triplet ( i , j , k ) is a right-handed triad, we can deduce the following: i
×
×
j = k ,
j
×
k = i , k
j .
Armed with this information, we can easily derive the cross product R :
×
i = j , j
×
i =
k , k
×
j =
i ,and i
×
k =
R = P
×
Q =( P 1 i + P 2 j + P 3 k )
×
( Q 1 i + Q 2 j + Q 3 k )
=( P 1 i + P 2 j + P 3 k )
×
Q 1 i +( P 1 i + P 2 j + P 3 k )
×
Q 2 j +( P 1 i + P 2 j + P 3 k )
×
Q 3 k
=( P 2 Q 3
P 3 Q 2 ) i +(
P 1 Q 3 + P 3 Q 1 ) j +( P 1 Q 2
P 2 Q 1 ) k
=( P 2 Q 3
P 3 Q 2 ,
P 1 Q 3 + P 3 Q 1 ,P 1 Q 2
P 2 Q 1 ) .
Themagnitudeof R can be calculated explicitly
2 =( P 2 Q 3
P 3 Q 2 ) 2 +(
P 1 Q 3 + P 3 Q 1 ) 2 +( P 1 Q 2
|
R
|
P 2 Q 1 )
=( P 1
+ P 2
+ P 3 )( Q 1 + Q 2 + Q 3 )
( P 1 Q 1 + P 2 Q 2 + P 3 Q 3 ) 2
2
2
( P · Q ) 2 =
2
2
cos θ ) 2
=
| P |
| Q |
| P |
| Q |
(
| P || Q |
2
2 (1 cos 2 θ )= | P |
2
2 sin 2 θ.
= | P |
| Q |
| Q |
To illustrate the magnitude, we can draw the parallelogram defined by P and Q (with
an angle θ between them) and show that vector Q sin θ is perpendicular to P .
The following expressions show how P
×
Q can be expressed by means of a deter-
minant,
= i
j
+ k
i
j
k
P 2
P 3
P 1
P 3
P 1
P 2
P × Q =
P 1
P 2
P 3
Q 2
Q 3
Q 1
Q 3
Q 1
Q 2
Q 1
Q 2
Q 3
=( P 2 Q 3
P 3 Q 2 ,
P 1 Q 3 + P 3 Q 1 ,P 1 Q 2
P 2 Q 1 ) ,
or,alternatively,bymeansofamatrix
0
P 3
P 2
.
P × Q =( Q 1 ,Q 2 ,Q 3 )
P 3
0
P 1
(A.5)
P 2
P 1
0
Search WWH ::




Custom Search