Graphics Reference
In-Depth Information
q
−
1
pq
=
−
ˆ
+
+
ˆ
(s
λ
v
)(
0
u
)(s
λ
v
)
=
(λ
v
·
u
+
s
u
−
λ
v
×
u
)(s
+
λ
v
)
+
λ
2
+
λ
2
=
λs
ˆ
v
·
u
−
λs
u
· ˆ
v
v
ˆ
×
u
· ˆ
v
v
ˆ
·
u
ˆ
v
+
s
2
u
−
λ
2
−
λs
ˆ
v
×
u
+
λs
u
× ˆ
v
v
ˆ
×
u
× ˆ
v
=
λ
2
(
ˆ
+
λ
2
(
ˆ
+
s
2
u
−
λ
2
(
ˆ
v
×
u
)
· ˆ
v
v
·
u
)
ˆ
v
−
2
λs
ˆ
v
×
u
v
×
u
)
× ˆ
v
.
Once again
ˆ
·
ˆ
(
v
×
u
)
v
=
0
and
(
v
ˆ
×
u
)
× ˆ
v
=
u
−
(
u
· ˆ
v
)
v
.
ˆ
Therefore,
q
−
1
pq
=
λ
2
(
ˆ
+
s
2
u
−
λ
2
u
+
λ
2
(
u
v
·
u
)
ˆ
v
−
2
λs
ˆ
v
×
u
· ˆ
v
)
ˆ
v
+
s
2
−
λ
2
u
2
λ
2
(
ˆ
=
v
·
u
)
ˆ
v
−
2
λs
ˆ
v
×
u
.
Again, let's make
s
=
cos
θ
and
λ
=
sin
θ
:
q
−
1
pq
=
−
ˆ
·
ˆ
+
−
ˆ
×
u
and the only thing that has changed is the sign of the cross-product term, which
reverses the direction of its vector. However, we must remember to compensate for
the angle-doubling by halving
θ
:
q
−
1
pq
(
1
2 cos
θ)(
v
u
)
v
cos 2
θ
u
sin 2
θ
v
=
(
1
−
cos
θ)(
v
ˆ
·
u
)
v
ˆ
+
cos
θ
u
−
sin
θ
v
ˆ
×
u
.
(11.2)
Let's see what happens when we employ (
11.2
) to rotate
u
=
2
i
, 90° about the
1
1
quaternion's vector
v
ˆ
=
√
2
i
+
√
2
k
:
1
√
2
i
√
2
k
√
2
j
2
√
2
1
q
−
1
pq
=
+
−
√
2
j
=
i
−
+
k
which has rotated
u
clockwise 90° about the quaternion's vector. Therefore, the
rotor
qpq
−
1
rotates a vector anticlockwise, and
q
−
1
pq
rotates a vector clockwise:
qpq
−
1
=
(
1
−
cos
θ)(
ˆ
v
·
u
)
ˆ
v
+
cos
θ
u
+
sin
θ
ˆ
v
×
u
q
−
1
pq
=
(
1
−
cos
θ)(
ˆ
v
·
u
)
ˆ
v
+
cos
θ
u
−
sin
θ
ˆ
v
×
u
.
However, we must remember that the rotor interprets
θ
as 2
θ
.
Let's compute another example. Consider the point
P(
0
,
1
,
1
)
in Fig.
11.5
which
is to be rotated 90° about the
y
-axis. We can see that the rotated point
P
has the
coordinates
(
1
,
1
,
0
)
which we will confirm algebraically. The point
P
is represented
by the pure quaternion
p
=
0
+
u
.
The axis of rotation is
v
ˆ
=
j
, and the vector to be rotated is
u
=
j
+
k
. Therefore,