Graphics Reference
In-Depth Information
5.10 Summary
Quaternions offer a powerful algebra for rotating points about an arbitrary axis and
it is important that they are fully understood before proceeding. We have yet to see
how quaternions actually perform this rotational task, which is covered in Chap. 11.
5.10.1 Summary of Quaternion Operations
q
=
s
+
v
=
s
+
x i
+
y j
+
z k
where s , x , y , z are scalars, and
i 2
j 2
k 2
=−
1 ,
=−
1 ,
=−
1 ,
ijk
=−
1
ij
=
k ,
jk
=
i ,
ki
=
j
ji
=−
k ,
kj
=−
i ,
ik
=−
j .
Addition and subtraction
q 1 ±
q 2 =
(s 1 ±
s 2 )
+
(x 1 ±
x 2 ) i
+
(y 1 ±
y 2 ) j
+
(z 1 ±
z 2 ) k .
Product
q 1 q 2 =
(s 1 s 2
x 1 x 2
y 1 y 2
z 1 z 2 )
+
(s 1 x 2 +
s 2 x 1 +
y 1 z 2
y 2 z 1 ) i
+
(s 1 y 2 +
s 2 y 1 +
z 1 x 2
z 2 x 1 ) j
+
(s 1 z 2 +
s 2 z 1 +
x 1 y 2
x 2 y 1 ) k
q 1 q 2 =
(s 1 s 2
v 1 ·
v 2 )
+
s 1 v 2 +
s 2 v 1 +
v 1 ×
v 2 .
Pure
q
=
0
+
v .
Magnitude
s 2
x 2
y 2
z 2 .
|
q
|=
+
+
+
Unit
s 2
x 2
y 2
z 2
|
q
|=
+
+
+
=
1 .
Quaternion conjugate
q =
s
v
=
s
x i
y j
z k
( q 1 q 2 ) =
q 2 q 1 .
Inverse
q
q q =
q
q 1
=
|
q
|
2
( q 1 q 2 ) 1
q 1
2
q 1
1
=
.
Search WWH ::




Custom Search