본문으로 이동
What is the quaternion
q
1
{\displaystyle q_{1}}
that represents the rotation of 180 degree about the x-axis?
q
1
=
(
cos
π
/
2
,
sin
π
/
2
×
i
)
=
(
0
,
1
,
0
,
0
)
{\displaystyle {\begin{array}{lcl}q_{1}&=&(\cos \pi /2,\sin \pi /2\times \mathbf {i} )\\&=&(0,1,0,0)\end{array}}}
What is the quaternion
q
2
{\displaystyle q_{2}}
that represents the rotation of 180 degree about the z-axis?
q
2
=
(
cos
π
/
2
,
sin
π
/
2
×
k
)
=
(
0
,
0
,
0
,
1
)
{\displaystyle {\begin{array}{lcl}q_{2}&=&(\cos \pi /2,\sin \pi /2\times \mathbf {k} )\\&=&(0,0,0,1)\end{array}}}
What rotation is represented by composite quaternion
q
=
q
1
q
2
{\displaystyle q=q_{1}q_{2}}
?
q
=
q
1
q
2
=
i
×
k
=
−
j
=
(
0
,
0
,
1
,
0
)
{\displaystyle {\begin{array}{lcl}q&=&q_{1}q_{2}\\&=&\mathbf {i} \times \mathbf {k} \\&=&-\mathbf {j} \\&=&(0,0,1,0)\end{array}}}
rotation of 180 degree about the y-axis
Let
x
{\displaystyle \mathbf {x} }
be a point and let
X
=
(
0
,
x
)
{\displaystyle X=(0,\mathbf {x} )}
be a quaternion whose scalar part is zero and whose vector part is equal to
x
{\displaystyle \mathbf {x} }
. Show that if
q
=
(
w
,
v
)
{\displaystyle q=(w,\mathbf {v} )}
is a unit quaternion, the product
q
X
q
−
1
{\displaystyle qXq^{-1}}
is a purely imaginary quaternion and the vector part of
q
X
q
−
1
{\displaystyle qXq^{-1}}
satisfies:
(
w
2
−
v
⋅
v
)
x
+
2
(
w
(
v
×
x
)
+
(
x
⋅
v
)
v
)
{\displaystyle (w^{2}-\mathbf {v} \cdot \mathbf {v} )\mathbf {x} +2\left(w(\mathbf {v} \times \mathbf {x} )+(\mathbf {x} \cdot \mathbf {v} )\mathbf {v} \right)}
q
−
1
=
(
w
,
−
v
)
{\displaystyle q^{-1}=(w,-\mathbf {v} )}
q
X
q
−
1
=
(
w
,
v
)
(
0
,
x
)
(
w
,
−
v
)
=
(
−
v
⋅
x
,
w
x
+
v
×
x
)
(
w
,
−
v
)
=
(
−
w
(
v
⋅
x
)
+
(
w
x
+
v
×
x
)
⋅
v
,
w
(
w
x
+
v
×
x
)
+
(
v
⋅
x
)
v
−
(
w
x
+
v
×
x
)
×
v
)
=
(
−
w
(
v
⋅
x
)
+
w
(
v
⋅
x
)
+
0
,
w
2
x
+
w
(
v
×
x
)
+
(
v
⋅
x
)
v
+
w
(
v
×
x
)
−
(
v
×
x
)
×
v
)
=
(
0
,
w
2
x
+
2
w
(
v
×
x
)
+
(
v
⋅
x
)
v
−
(
v
⋅
v
)
x
+
(
v
⋅
x
)
v
)
=
(
0
,
(
w
2
−
v
⋅
v
)
x
+
2
(
w
(
v
×
x
)
+
(
v
⋅
x
)
v
)
)
{\displaystyle {\begin{array}{lcl}qXq^{-1}&=&(w,\mathbf {v} )(0,\mathbf {x} )(w,-\mathbf {v} )\\&=&(-\mathbf {v} \cdot \mathbf {x} ,w\mathbf {x} +\mathbf {v} \times \mathbf {x} )(w,-\mathbf {v} )\\&=&(-w(\mathbf {v} \cdot \mathbf {x} )+(w\mathbf {x} +\mathbf {v} \times \mathbf {x} )\cdot \mathbf {v} ,w(w\mathbf {x} +\mathbf {v} \times \mathbf {x} )+(\mathbf {v} \cdot \mathbf {x} )\mathbf {v} -(w\mathbf {x} +\mathbf {v} \times \mathbf {x} )\times \mathbf {v} )\\&=&(-w(\mathbf {v} \cdot \mathbf {x} )+w(\mathbf {v} \cdot \mathbf {x} )+0,w^{2}\mathbf {x} +w(\mathbf {v} \times \mathbf {x} )+(\mathbf {v} \cdot \mathbf {x} )\mathbf {v} +w(\mathbf {v} \times \mathbf {x} )-(\mathbf {v} \times \mathbf {x} )\times \mathbf {v} )\\&=&(0,w^{2}\mathbf {x} +2w(\mathbf {v} \times \mathbf {x} )+(\mathbf {v} \cdot \mathbf {x} )\mathbf {v} -(\mathbf {v} \cdot \mathbf {v} )\mathbf {x} +(\mathbf {v} \cdot \mathbf {x} )\mathbf {v} )\\&=&(0,(w^{2}-\mathbf {v} \cdot \mathbf {v} )\mathbf {x} +2\left(w(\mathbf {v} \times \mathbf {x} )+(\mathbf {v} \cdot \mathbf {x} )\mathbf {v} \right))\end{array}}}
Show that q and -q represent same rotation using the result of Exercise 4.
−
q
=
(
−
w
.
−
v
)
{\displaystyle -q=(-w.-\mathbf {v} )}
−
q
X
(
−
q
)
−
1
=
(
(
−
w
)
2
−
(
−
v
)
⋅
(
−
v
)
)
x
+
2
(
(
−
w
)
(
−
v
×
x
)
+
(
x
⋅
(
−
v
)
)
v
)
=
(
w
2
−
v
⋅
v
)
x
+
2
(
w
(
v
×
x
)
+
(
x
⋅
v
)
v
)
=
q
X
q
−
1
{\displaystyle {\begin{array}{lcl}-qX(-q)^{-1}&=&\left((-w)^{2}-(-\mathbf {v} )\cdot (-\mathbf {v} )\right)\mathbf {x} +2\left((-w)(-\mathbf {v} \times \mathbf {x} )+(\mathbf {x} \cdot (-\mathbf {v} ))\mathbf {v} \right)\\&=&(w^{2}-\mathbf {v} \cdot \mathbf {v} )\mathbf {x} +2\left(w(\mathbf {v} \times \mathbf {x} )+(\mathbf {x} \cdot \mathbf {v} )\mathbf {v} \right)\\&=&qXq^{-1}\end{array}}}
Therefore
q
{\displaystyle q}
and
−
q
{\displaystyle -q}
represents the same rotation.
Compare the number of additions and multiplications needed to perform the following operations:
Compose two rotation matrices.
given n × n matrices A and B,
(
A
B
)
i
j
=
∑
r
=
1
n
a
i
r
b
r
j
=
a
i
1
b
1
j
+
a
i
2
b
2
j
+
⋯
+
a
i
n
b
n
j
.
{\displaystyle (AB)_{ij}=\sum _{r=1}^{n}a_{ir}b_{rj}=a_{i1}b_{1j}+a_{i2}b_{2j}+\cdots +a_{in}b_{nj}.}
this requires at least (n-1) additions and n multiplications per single element
3 × 3 matrix multiplication requires (2 additions + 3 multiplication) * 9 elements = 18 additions + 27 multiplications)
Compose two quaternions
(
w
1
+
x
1
i
+
y
1
j
+
z
1
k
)
×
(
w
2
+
x
2
i
+
y
2
j
+
z
2
k
)
=
w
1
w
2
−
x
1
x
2
−
y
1
y
2
−
z
1
z
2
+
(
w
1
x
2
+
x
1
w
2
+
y
1
z
2
−
z
1
y
2
)
i
+
(
w
1
y
2
+
y
1
w
2
+
z
1
x
2
−
x
1
z
2
)
j
+
(
w
1
z
2
+
z
1
w
2
+
x
1
y
2
−
y
1
x
2
)
k
{\displaystyle {\begin{array}{l}(w_{1}+x_{1}\mathbf {i} +y_{1}\mathbf {j} +z_{1}\mathbf {k} )\times (w_{2}+x_{2}\mathbf {i} +y_{2}\mathbf {j} +z_{2}\mathbf {k} )\\{\begin{array}{ll}=&w_{1}w_{2}-x_{1}x_{2}-y_{1}y_{2}-z_{1}z_{2}\\&+(w_{1}x_{2}+x_{1}w_{2}+y_{1}z_{2}-z_{1}y_{2})\mathbf {i} \\&+(w_{1}y_{2}+y_{1}w_{2}+z_{1}x_{2}-x_{1}z_{2})\mathbf {j} \\&+(w_{1}z_{2}+z_{1}w_{2}+x_{1}y_{2}-y_{1}x_{2})\mathbf {k} \end{array}}\end{array}}}
this requires 12 additions + 16 multiplications
Apply a rotation matrix to a vector
A
x
=
(
A
1
,
1
x
1
+
A
1
,
2
x
2
+
A
1
,
3
x
3
,
A
2
,
1
x
1
+
A
2
,
2
x
2
+
A
2
,
3
x
3
,
A
3
,
1
x
1
+
A
3
,
2
x
2
+
A
3
,
3
x
3
)
{\displaystyle A\mathbf {x} =\left(A_{1,1}\mathbf {x} _{1}+A_{1,2}\mathbf {x} _{2}+A_{1,3}\mathbf {x} _{3},A_{2,1}\mathbf {x} _{1}+A_{2,2}\mathbf {x} _{2}+A_{2,3}\mathbf {x} _{3},A_{3,1}\mathbf {x} _{1}+A_{3,2}\mathbf {x} _{2}+A_{3,3}\mathbf {x} _{3}\right)}
(2 additions + 3 multiplications) * 3 elements = 6 additions + 9 multiplications
Apply a quaternion to a vector (as in Exercise 4)
(
w
2
−
v
⋅
v
)
x
+
2
w
(
v
×
x
)
+
(
x
⋅
v
)
v
)
=
(
(
w
2
−
v
⋅
v
)
x
1
+
2
w
(
v
2
x
3
−
v
3
x
2
)
+
2
(
x
⋅
v
)
v
1
,
(
w
2
−
v
⋅
v
)
x
2
+
2
w
(
v
3
x
1
−
v
1
x
3
)
+
2
(
x
⋅
v
)
v
2
,
(
w
2
−
v
⋅
v
)
x
3
+
2
w
(
v
1
x
2
−
v
2
x
1
)
+
2
(
x
⋅
v
)
v
3
)
{\displaystyle {\begin{array}{l}(w^{2}-\mathbf {v} \cdot \mathbf {v} )\mathbf {x} +2w(\mathbf {v} \times \mathbf {x} )+(\mathbf {x} \cdot \mathbf {v} )\mathbf {v} )\\{\begin{array}{ll}=&((w^{2}-\mathbf {v} \cdot \mathbf {v} )x_{1}+2w(v_{2}x_{3}-v_{3}x_{2})+2(\mathbf {x} \cdot \mathbf {v} )v_{1},\\&(w^{2}-\mathbf {v} \cdot \mathbf {v} )x_{2}+2w(v_{3}x_{1}-v_{1}x_{3})+2(\mathbf {x} \cdot \mathbf {v} )v_{2},\\&(w^{2}-\mathbf {v} \cdot \mathbf {v} )x_{3}+2w(v_{1}x_{2}-v_{2}x_{1})+2(\mathbf {x} \cdot \mathbf {v} )v_{3})\end{array}}\end{array}}}
w
2
−
v
⋅
v
=
w
2
−
v
1
2
−
v
2
2
−
v
3
3
{\displaystyle w^{2}-\mathbf {v} \cdot \mathbf {v} =w^{2}-v_{1}^{2}-v_{2}^{2}-v_{3}^{3}}
: 3 additions + 4 multiplications
x
⋅
v
=
x
1
v
1
+
x
2
v
2
+
x
3
v
3
{\displaystyle \mathbf {x} \cdot \mathbf {v} =x_{1}v_{1}+x_{2}v_{2}+x_{3}v_{3}}
: 2 additions + 3 multiplications
total : (4 additions + 5 multiplications) * 3 + 5 additions + 7 multiplications
= 17 additions + 22 multiplications
(if times 2 is counted as multiplication, then 6 more multiplications) : 17 additions + 28 multiplications
Show that a rigid body rotating at angular velocity
ω
(
t
)
∈
R
3
{\displaystyle \omega (t)\in \mathbb {R} ^{3}}
can be represented by the quaternion differential equations
q
˙
(
t
)
=
1
2
(
0
,
ω
(
t
)
)
q
(
t
)
{\displaystyle {\dot {q}}(t)={\frac {1}{2}}\left(0,\omega (t)\right)q(t)}
Hint: Recall that the angular velocity
ω
(
t
)
{\displaystyle \omega (t)\,}
indicates that the body is instantaneously rotating about the
ω
{\displaystyle \omega }
axis with magnitude
|
|
ω
(
t
)
|
|
{\displaystyle \left|\left|\omega (t)\right|\right|}
. Suppose that a body were to rotate with a constant angular velocity
ω
(
t
)
{\displaystyle \omega (t)\,}
. Then the rotation of the body after a period of time
Δ
t
{\displaystyle \Delta t\,}
is represented by the quaternion
(
cos
|
|
ω
(
t
)
|
|
Δ
t
2
,
ω
(
t
)
|
|
ω
(
t
)
|
|
sin
|
|
ω
(
t
)
|
|
Δ
t
2
)
{\displaystyle \left(\cos {\frac {\left|\left|\omega (t)\right|\right|\Delta t}{2}},{\frac {\omega (t)}{\left|\left|\omega (t)\right|\right|}}\sin {\frac {\left|\left|\omega (t)\right|\right|\Delta t}{2}}\right)}
At times
t
+
Δ
t
{\displaystyle t+\Delta t\,}
(for small
Δ
t
{\displaystyle \Delta t\,}
), the orientation of the body is (to within the first order)
q
(
t
+
Δ
t
)
=
(
cos
|
|
ω
(
t
)
|
|
Δ
t
2
,
ω
(
t
)
|
|
ω
(
t
)
|
|
sin
|
|
ω
(
t
)
|
|
Δ
t
2
)
q
(
t
)
{\displaystyle q(t+\Delta t)=\left(\cos {\frac {\left|\left|\omega (t)\right|\right|\Delta t}{2}},{\frac {\omega (t)}{\left|\left|\omega (t)\right|\right|}}\sin {\frac {\left|\left|\omega (t)\right|\right|\Delta t}{2}}\right)q(t)}
compute
q
˙
{\displaystyle {\dot {q}}}
by differentiating the above equation
q
˙
(
t
)
=
lim
Δ
t
→
0
q
(
t
+
Δ
t
)
−
q
(
t
)
Δ
t
=
lim
Δ
t
→
0
[
(
cos
|
|
ω
(
t
)
|
|
Δ
t
2
,
ω
(
t
)
|
|
ω
(
t
)
|
|
sin
|
|
ω
(
t
)
|
|
Δ
t
2
)
−
1
]
q
(
t
)
Δ
t
=
lim
Δ
t
→
0
[
(
cos
|
|
ω
(
t
)
|
|
Δ
t
2
−
1
)
/
Δ
t
,
ω
(
t
)
|
|
ω
(
t
)
|
|
sin
|
|
ω
(
t
)
|
|
Δ
t
2
/
Δ
t
]
q
(
t
)
=
(
∂
∂
Δ
t
cos
|
|
ω
(
t
)
|
|
Δ
t
2
,
ω
(
t
)
|
|
ω
(
t
)
|
|
∂
∂
Δ
t
sin
|
|
ω
(
t
)
|
|
Δ
t
2
)
q
(
t
)
(by lHospitals rule)
=
(
0
,
ω
(
t
)
|
|
ω
(
t
)
|
|
|
|
ω
(
t
)
|
|
2
)
q
(
t
)
=
1
2
(
0
,
ω
(
t
)
)
q
(
t
)
{\displaystyle {\begin{array}{lcl}{\dot {q}}(t)&=&\lim \limits _{\Delta t\to 0}{\frac {q(t+\Delta t)-q(t)}{\Delta t}}\\&=&\lim \limits _{\Delta t\to 0}\left[\left(\cos {\frac {\left|\left|\omega (t)\right|\right|\Delta t}{2}},{\frac {\omega (t)}{\left|\left|\omega (t)\right|\right|}}\sin {\frac {\left|\left|\omega (t)\right|\right|\Delta t}{2}}\right)-1\right]{\frac {q(t)}{\Delta t}}\\&=&\lim \limits _{\Delta t\to 0}\left[\left(\cos {\frac {\left|\left|\omega (t)\right|\right|\Delta t}{2}}-1\right)/\Delta t,{\frac {\omega (t)}{\left|\left|\omega (t)\right|\right|}}\sin {\frac {\left|\left|\omega (t)\right|\right|\Delta t}{2}}/\Delta t\right]q(t)\\&=&\left({\frac {\partial }{\partial \Delta t}}\cos {\frac {\left|\left|\omega (t)\right|\right|\Delta t}{2}},{\frac {\omega (t)}{\left|\left|\omega (t)\right|\right|}}{\frac {\partial }{\partial \Delta t}}\sin {\frac {\left|\left|\omega (t)\right|\right|\Delta t}{2}}\right)q(t)\,\,\,\,\,\,{\mbox{(by lHospitals rule)}}\\&=&\left(0,{\frac {\omega (t)}{\left|\left|\omega (t)\right|\right|}}{\frac {\left|\left|\omega (t)\right|\right|}{2}}\right)q(t)\\&=&{\frac {1}{2}}\left(0,\omega (t)\right)q(t)\end{array}}}