
17.2 Quaternions 769
Q =
⎡
⎢
⎢
⎣
γ −σw
2
σw
1
σw
0
σw
2
γ −σw
0
σw
1
−σw
1
σw
0
γσw
2
−σw
0
−σw
1
−σw
2
γ
⎤
⎥
⎥
⎦
(17.22)
Although Q has 16 entries, only four of them are unique—the last column values.
Moreover ,
Q of Equation (17.20) uses these same four values:
Q =
⎡
⎢
⎢
⎣
γ −σw
2
σw
1
−σw
0
σw
2
γ −σw
0
−σw
1
−σw
1
σw
0
γ −σw
2
σw
0
σw
1
σw
2
γ
⎤
⎥
⎥
⎦
(17.23)
17.2.2 Rotation of a Vector
The rotation of a vector (x , y, z) using the 4D representation of Equation (17.21) is
accomplished by appending a zero component to the vector:
⎡
⎢
⎢
⎣
x
y
z
0
⎤
⎥
⎥
⎦
R
⎡
⎢
⎢
⎣
x
y
z
0
⎤
⎥
⎥
⎦
=
QQ
⎡
⎢
⎢
⎣
x
y
z
0
⎤
⎥
⎥
⎦
(17.24)
An implementation will take advantage of the fact that the input vector has a
zero component, in which case it is not necessary to multiply ...