Graphics Reference
In-Depth Information
Table 6.1. Values associated with the vectors shown in
Fig. 6.3
x h
y h
x t
y t
x
y
Vector
2
0
0
0
2
0
2
0
2
0
0
0
2
2
2
0
0
0
2
0
2
0
2
0
0
0
2
2
2
1
1
0
0
1
1
2
1
1
0
0
1
1
2
1
1
0
0
1
1
2
1
1
0
0
1
1
Y
P h
' y
r
P t
' x
' z
Z
X
Fig. 6.4. The 3D vector has components ∆ x, y, z , which are the differences be-
tween the head and tail coordinates.
y =( y h
y t )
(6.4)
z =( z h
z t )
(6.5)
= x 2 +∆ y 2 +∆ z 2
|| r ||
(6.6)
As 3D vectors play a very important part in computer animation, all future
examples will be three-dimensional.
6.2.1 Vector Manipulation
As vectors are different from scalars, a set of rules has been developed to
control how the two mathematical entities interact with one another. For
instance, we need to consider vector addition, subtraction and multiplication,
and how a vector can be modified by a scalar. Let's begin with multiplying a
vector by a scalar.
 
Search WWH ::




Custom Search