681 - Introduction to Computer Graphics - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

681 - Introduction to Computer Graphics

Description:

... Review of Quaternion Rotations Rotq(v) = v = q * [0,v] * q-1 Rotq(v ... Interpolation Background De Casteljau construction of Bezier curve ... – PowerPoint PPT presentation

Number of Views:69
Avg rating:3.0/5.0
Slides: 22
Provided by: rickp154
Category:

less

Transcript and Presenter's Notes

Title: 681 - Introduction to Computer Graphics


1
Animating with Quaternions
Given quaternion representations, interpolate
through them
Cubic, interpolating
Use operations efficient with quaternion
representation
Halfway between 2 quaternions
Spherical Linear interpolation
2
Review of Quaternion Math
(cos(q/2),sin(q/2)A)
s1,v1 s2,v2 s1s2,v1v2
s1,v1 s2,v2 s1s2-v1.v2,s1v2s2v1v1Xv2

q sqrt(ss xx yy zz)
q-1 -s,v/q2
3
Rotation Matrix of a Unit Quaternion
w,x,y,z
4
Review of Quaternion Rotations
Rotq(v) v q 0,v q-1
Rotq(v) Rotkq(v)
Rotqp(v) Rotq(Rotp(v) )
5
Quaternions as points on a 4D sphere
Unit quaternion q(s,x,y,z), q 1
Want equal increment along arc connecting two
quaternions on surface of sphere spherical linear
interpolation
6
Linearly interpolate between quaternions
q(sq,xq,yq,zq), p(sp,xp,yp,zp)
7
Interpolation
K (1-a) A a B
Scalar
(linear interpolation lerp)
Quaternions?
8
Quaternion Power Operator
cos(q/2), sin(q /2) A a
cos(aq/2), sin(aq /2) A

q a rotates to q orientation as a goes from 0 to
1
Remember q and -q represent same orientation q
a and (-q) a give different rotation sequences 0lt
q lt p gives short squence p lt q lt2 p gives long
one Since first term in q is cos(q/2), q gives
short sequence if first term is positive
9
Quaternions as points on a 4D sphere
Remember Rots,v Rot-s,-v
Use quaternion representations that are close
to each other
Given quaternion p, should you interpolate to q
or -q?
p and q are close if their 4D dot product is
greater than zero.
10
Interpolation of rotations
q slerp(qa,qb, a)
11
Review of Bezier Interpolation
Using Catmull-Romm interp of interior control
points
12
Bezier Interpolation of Quaternions
13
Interpolation Background
De Casteljau construction of Bezier curve
u1/3
P(1/3)
14
Interpolation Background
Easy to compute quaternion half-way point
q1/2 q0 q01
15
Quaternion - cubic interpolation
16
Quaternion Interpolation
Automatically generating interior (spherical)
control points
Q n
P n
A n
P n1
Bisect the span
P n-1
Double the arc
17
Quaternion Interpolation
Q n
Double(q1,q2) q2q1-1q2
P n
Q n Double(P n-1, P n)
P n-1
18
Construct Midpoint
q1 q2 s1,x1,y1,z1 s2,x2,y2,z2
Bisect(p,q) (pq)/pq
A n Bisect(Q n, P n1)
19
Spherical Linear Interpolation
20
Repeated mid-point interpolation
For u 1/4
21
Quaternion Interpolation
Linearly interpolating between 4 keys
Cubic Bezier interpolation among same 4 keys
Write a Comment
User Comments (0)
About PowerShow.com