Graphics Reference
In-Depth Information
Y
r
+
s
s
r
Z
X
Fig. 6.5.
Vector addition
r
+
s
.
Y
s
r
−
s
r
−
s
Z
X
Fig. 6.6.
Vector subtraction
r
−
s
.
6.2.4 Position Vectors
Given any point
P
(
x
,
y
,
z
), a
position vector
p
can be created by assuming
that
P
is the vector's head and the origin is its tail. Because the tail coor-
dinates are (0, 0, 0) the vector's
components
are
x
,
y
,
z
. Consequently, the
vector's magnitude
equals
x
2
+
y
2
+
z
2
. For example, the point
P
(4, 5,
6) creates a position vector
p
relative to the origin:
||
p
||
⎡
⎤
4
5
6
=
4
2
+5
2
+6
2
=20
.
88
⎣
⎦
||
p
||
p
=
We will see how position vectors are used in Chapter 8 when we consider
analytical geometry.
6.2.5 Unit Vectors
By definition, a
unit
vector has a magnitude of 1. A simple example is
i
where
⎡
⎤
1
0
0
⎣
⎦
||
i
||
i
=
=1