Graphics Reference
In-Depth Information
cross product is not commutative, which means that if the vectors representing the base become
reversed, the resulting normal vector n points in the opposite direction to the third vector,
which in turn makes the final dot product negative. Thus, strictly speaking, abc represents the
signed volume of the prism. To illustrate this, we will compute the volume of a cube and show
why vector order is so important.
Y
n
c
X
a
b
Z
Figure 2.26.
Figure 2.26 shows three vectors, a , b , and c , that provide the basis for a cube. The vectors are
defined as
a
=−
k
b
=−
i
=
c
j
and are organised in a right-hand sequence.
Substituting these in
abc
=
Volume
=
a
×
b
·
c
(2.16)
we obtain
abc
=
k
×−
i
·
j
First, let's compute the cross product
×−
k
i
i j k
00
×−
=
1
=
k
i
j
100
Now compute the dot product
j
·
j
=+
1
 
Search WWH ::




Custom Search