12_animation_ii

# 12_animation_ii - Computer Animation III Quaternions...

This preview shows pages 1–12. Sign up to view the full content.

Computer Animation III Quaternions Dynamics Some slides courtesy of Leonard McMillan and Jovan Popovic

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Recap: Euler angles 3 angles along 3 axis Poor interpolation, lock But used in flight simulation, etc. because natural http://www.fho-emden.de/~hoffmann/gimbal09082002.pdf
Assignment 5: OpenGL Interactive previsualization ± OpenGL API ± Graphics hardware ± Jusr send rendering commands ± State machine Solid textures ± New Material subclass ± Owns two Material* ± Chooses between them ± “Shader tree”

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Final project First brainstorming session on Thursday Groups of three Proposal due Monday 10/27 ± A couple of pages ± Goals ± Progression Appointment with staff
Final project Goal-based ± Simulate a visual effect ± Natural phenomena ± Small animation ± Game ± Reconstruct an existing scene Technique-based ± Monte-Carlo Rendering ± Radiosity ± Fluid dynamics

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Overview Interpolation of rotations, quaternions ± Euler angles ± Quaternions Dynamics ± Particles ± Rigid body ± Deformable objects
Quaternion principle A quaternion = point on unit 3-sphere in 4D = orientation. We can apply it to a point, to a vector, to a ray We can convert it to a matrix We can interpolate in 4D and project back onto sphere ± How do we interpolate? ± How do we project?

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Quaternion recap 1 (wake up) 4D representation of orientation q = {cos( θ/2 ); v sin( θ/2 )} Inverse is q -1 =(s, - v ) Multiplication rule ± Consistent with rotation composition How do we apply rotations? How do we interpolate? v ( ) () 12 1 2 21 1 2 , ss vv sv v qq =− ++ × r rrr r r
Quaternion Algebra Two general quaternions are multiplied by a special rule: Sanity check : {cos( α/2 ); v sin( α/2 )} {cos( β/2 ); v sin( β/2 )} {cos( α/2 )cos( β/2 ) - sin( α/2 ) v . sin( β/2 )} v , cos( β/2 ) sin( α/2 ) v + cos( α/2 )sin( β/2 ) v + v × v } {cos( α/2 )cos( β/2 ) - sin( α/2 )s in( β/2 ), v (cos( β/2 ) sin( α/2 ) + cos( α/2 ) sin( β/2 ))} {cos( (α+β)/2 ), v sin( (α+β)/2 ) } ( ) () 12 1 2 21 1 2 , ss vv sv v qq =− ++ × r rrr r r

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Quaternion Algebra Two general quaternions are multiplied by a special rule: To rotate 3D point/vector p by q , compute ± q {0; p } q -1 p= (x,y,z) q ={ cos( θ /2), 0,0,sin( θ /2) } = {c, 0,0,s} q {0, p }= {c, 0, 0, s} {0, x, y, z} ( ) () 12 1 2 21 1 2 , ss vv sv v qq =− ++ × r rrr r r = {c.0- zs, c p +0(0,0,s)+ (0,0,s) × p } = {-zs, c p + (-sy,sx,0) } q {0, p } q -1 = {-zs, c p + (-sy,sx,0) } {c, 0,0,-s} = {-zsc-(c p +(-sy,sx,0)).(0,0,-s), -zs(0,0,-s)+c(c p +(-sy, sx,0))+ (c p + (-sy,sx,0) ) x (0,0,-s) } = {0, (0,0,zs 2 )+c 2 p +(-csy, csx,0)+(-csy, csx, 0)+(s 2 x, s 2 y, 0)} = {0, (c 2 x-2csy-s 2 x, c 2 y+2csx-s 2 y, zs 2+ sc 2 )} = {0, x cos( θ )-y sin( θ ), x sin( θ )+y cos( θ ), z }
Quaternion Interpolation (velocity) The only problem with l inear int erp olation (lerp) of quaternions is that it interpolates the straight line (the secant) between the two quaternions and not their spherical distance.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 48

12_animation_ii - Computer Animation III Quaternions...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online