Graphics Reference
In-Depth Information
From Fig. 2.45, we can predict that the new coordinates are 1
−
1 1.
The direction cosines for X
, Y
, and Z
are 010
−
100001, respectively.
Therefore,
⎡
⎤
⎡
⎤
⎡
⎤
⎡
⎤
x
P
y
P
z
P
010
1
1
1
1
⎣
⎦
=
⎣
⎦
·
⎣
⎦
=
⎣
⎦
−
100
001
−
1
1
which is correct!
2.15 Summary
•
A vector quantity possesses both magnitude and direction, which are encoded within its
components.
Given two points A and B, the vector
−
AB is given by
•
⎡
⎤
x
B
−
x
A
−
AB
⎣
⎦
=
y
B
−
y
A
z
B
−
z
A
•
The magnitude or length of a vector is expressed as
a
, which equals
x
a
+
y
a
or
x
a
+
y
a
+
z
a
•
The resultant of two vectors
a
and
b
equals their vector sum
a
+
b
.
•
Vector addition obeys the commutative and associative laws:
+
=
+
a
b
b
a
(commutative law)
a
+
b
+
c
=
a
+
b
+
c
(associative law)
•
The scalar product of two vectors is defined as
a
·
b
=
a
b
cos
=
x
a
x
b
+
y
a
y
b
+
z
a
z
b
where is the angle between the vectors.
•
The scalar product obeys the commutative and distributive laws of multiplication:
a
·
b
=
b
·
a
a
·
b
+
c
=
a
·
b
+
a
·
c
•
The vector product of two vectors is defined as
i
j k
a
×
b
=
c
=
x
a
y
a
z
a
x
b
y
b
z
b
where
c
=
a
b
sin and is the angle between
a
and
b
.