Graphics Reference
In-Depth Information
Fig. 11.11
The point
(
0
,
1
,
1
)
is rotated 90° about
the vector
v
to
(
0
,
−
1
,
1
)
Therefore, using (
11.8
)
√
2
2
√
2
2
=
cos
θ
=
0
.
5
=
60°
.
Before proceeding, let's compute the two matrices for the two quaternion triples.
For
q
1
θ
√
2
2
√
2
2
s
=
,x
=
0
,y
=
,z
=
0
which when substituted in (
11.3
)gives
⎡
⎤
⎡
⎤
001
010
x
u
y
u
z
u
q
1
pq
−
1
⎣
⎦
⎣
⎦
.
=
1
−
100
Substituting the coordinates
(
0
,
1
,
1
)
gives
⎡
⎤
⎦
=
⎡
⎣
⎤
⎦
⎡
⎣
⎤
⎦
1
1
0
001
010
0
1
1
⎣
−
100
which is correct.
For
q
2
√
2
2
√
2
2
s
=
,x
=
,y
=
0
,z
=
0
which when substituted in (
11.3
)gives
⎡
⎤
⎡
⎤
10
0
x
u
y
u
z
u
q
2
pq
−
1
⎣
⎦
⎣
⎦
.
=
00
−
1
2
01
0
Substituting the coordinates
(
0
,
1
,
1
)
gives
⎡
⎤
⎡
⎤
⎡
⎤
0
10
0
0
1
1
⎣
⎦
=
⎣
⎦
⎣
⎦
−
1
1
00
−
1
01
0
which is also correct.