Graphics Reference
In-Depth Information
Appendix A
A.1 Definitions and laws of vector algebra
These are the definitions and laws associated with vectors.
If
u
v
, and
w
are vectors, and a and b are scalars, then
By definition, two vectors
u
and
v
are equal if they have the same magnitude and direction.
By definition, if two vectors
u
and
v
have the same magnitude but opposite directions, then
u
=−
v
or
v
=−
u
.
A.2 Common laws of vector algebra
Commutative law of addition:
u
+
v
=
v
+
u
Associative law of addition:
u
+
v
+
w
=
u
+
v
+
w
Commutative law of multiplication: a
u
=
u
a
Associative law of multiplication: ab
u
=
ab
u
Distributive law: a
+
b
u
=
a
u
+
b
u
Distributive law: a
u
+
v
=
a
u
+
a
v
By definition, the scalar product
u
·
v
is
u
·
v
=
u
v
cos .
is the angle between
u
and
v
.
By definition, the vector product
u
×
v
is
u
×
v
=
w
where
sin.
is the angle between
u
and
v
.
Note:
The vector product works only in 3D.
w
=
u
v
247