Graphics Reference
In-Depth Information
The difference is rather subtle: in ( 5.1 ) the scalar and vector are separated by a
comma, whereas in ( 5.2 )a'
+
' sign is used as in complex numbers. Although the
idea of adding a scalar to a vector seems strange, this notation is used in this topic
as it helps us understand the ideas behind multivectors, which are covered in the
next chapter. Since Hamilton's invention, mathematicians have successfully applied
quaternions to rotate points about an arbitrary axis, which is why we are interested
in them.
A quaternion then, is the combination of a scalar and a vector:
q
= s +
v
where s is a scalar and v is a 3D vector. If we express the vector v in terms of its
components, we have
q
= s + x i
+ y j
+ z k
where s,x,y,z are all scalars .
Later on we will discover that in the context of a rotation transform, v is used to
represent the axis of rotation, and the scalar s encodes the angle of rotation.
5.2.1 Axioms
Quaternions share the same axioms as complex numbers apart from multiplication,
where they do not commute.
Addition:
Commutative
q 1 +
q 2 =
q 2 +
q 1
Associative
( q 1 +
q 2 )
+
q 3 =
q 1 +
( q 2 +
q 3 ).
Multiplication:
Associative
( q 1 q 2 ) q 3 =
q 1 ( q 2 q 3 )
Non-commutative
q 1 q 2 =
q 2 q 1 .
5.3 Adding and Subtracting Quaternions
Two quaternions q 1 and q 2
q 1 =
s 1 +
x 1 i
+
y 1 j
+
z 1 k
+ z 2 k
are equal if, and only if, their corresponding terms are equal. Furthermore, like vec-
tors, they can be added and subtracted as follows:
q 2 = s 2 + x 2 i
+ y 2 j
q 1 ±
q 2 = (s 1 ± s 2 ) + (x 1 ± x 2 ) i
+ (y 1 ± y 2 ) j
+ (z 1 ± z 2 ) k .
Search WWH ::




Custom Search