1
6.2 Quaternions
...or, adventures on the 4D unit sphere
Jaakko Lehtinen with lots of slides from Frédo Durand Aalto CS-C3100 Computer Graphics
Wikipedia user Blutfink
6.2 Quaternions ...or, adventures on the 4D unit sphere Jaakko - - PowerPoint PPT Presentation
Wikipedia user Blutfink Aalto CS-C3100 Computer Graphics 6.2 Quaternions ...or, adventures on the 4D unit sphere Jaakko Lehtinen with lots of slides from Frdo Durand 1 Video on YouTube Watch the fantastic video by Grant Sanderson
1
Jaakko Lehtinen with lots of slides from Frédo Durand Aalto CS-C3100 Computer Graphics
Wikipedia user Blutfink
2
3
– Trivial with exponential notation reiθ
4
q0 q1
keyframes lerp
5
6
keyframes lerp slerp
interpolate along arc line rather than secant
keyframes lerp slerp
interpolate along arc line rather than secant
7
between the two orientations
a sine term:
(Hint for 1: Differentiate w.r.t. t, take magnitude, trig identities General hints: trig identities, q0 and q1 are unit, definition of ω)
8
– plane rotation in 2D: a point on unit circle
– use slerp for uniform speed
θ0 θ1
q0 q1
9
q0 q1
10
11
http://en.wikipedia.org/wiki/William_Rowan_Hamilton
12
– d+ai+bj+ck – One real part (d), three imaginary ones.
– i2 = j2 = k2 = -1 – and weird multiplication rules
http://en.wikipedia.org/wiki/William_Rowan_Hamilton
13
– d+ai+bj+ck – One real part (d), three imaginary ones.
v
14
– Right-hand rotation of θ radians about v: q = (cos(θ/2); v sin(θ/2)),
– unit quaternions are restricted to the unit 3-sphere in 4D (by definition of the unit sphere) – q & -q represent the same orientation
angle when axis flips if rotation is to remain same?) – Resembles axis-angle, but with the sines and cosines
v
15
– Right-hand rotation of θ radians about v: q = (cos(θ/2); v sin(θ/2)),
v
16
– Right-hand rotation of θ radians about v: q = (cos(θ/2); v sin(θ/2)),
q q v
17
– Rotation in 2D embedded on unit circle
– works on the sphere in any dimension – Quaternions
18
19
20
q1 q0
21
u v n
t=t1 t=t2 t=t3
q1 q4 q2 q3
22
q1 q4 q2 q3
22
slerp(q1, q2, t) slerp(q2, q3, t) slerp(q3, q4, t)
slerp slerp
q1 q4 q2 q3
22
slerp(q1, q2, t) slerp(q2, q3, t) slerp(q3, q4, t)
slerp slerp slerp
q1 q4 q2 q3
22
slerp(q1, q2, t) slerp(q2, q3, t) slerp(q3, q4, t)
23
From Kim et al. 1995
24
25
26
27
2 − 2q2 3
1 − 2q2 3
1 − 2q2 2
28
29
30
31
32
– Set Q0 = M, – then Qi+1 = 1/2(Qi+ Qi–T) until Qi+1 – Qi ≈ 0.
33
34
(θ; v)(θ; v) = (θθ − v · v; θv + θv + v × v)
35
36
37
38
39
take the transpose and the conjugate of each coefficient. But we don’t care here.)
40
41