Graphics Reference
In-Depth Information
So, the unit is
WC unit
sec
40
×
.
That is, a velocity
V
e
of
=
500
will move the position of an object in the positive
x
-axis direction five WC units
during each update, or
V
e
200
WC unit
sec
For this reason, if we want to move an object in our world at a speed of
v
units
sec
WC unit
sec
=
5
×
40
,we
v
will make sure the magnitude of the velocity vector is
40
.
B.2
Vector Products
The two most common vector operations we work with in computer graphics are
the dot product and the cross product.
B.2.1
Dot Product
The vector dot product, sometimes called the scalar product, is written:
d
=
V
a
·
V
b
.
The dot product has an important geometric property:
V
a
·
V
b
=
V
a
V
b
cos
θ
,
where
is the angle between the two vectors. When one of the vectors in the dot
product operation is normalized, for example ,
V
a
, because
θ
V
a
V
a
=
1
,
then
V
a
θ
.
As illustrated in Figure B.4, geometrically, this is the length of vector
V
b
mea-
sured along the direction of vector
V
a
. In the case when both of the vectors are
normalized, it is especially convenient:
·
V
b
=
V
b
cos
Figure B.4.
Dot product.
V
a
·
V
b
.
cos
θ
=
Search WWH ::
Custom Search