Unformatted text preview:

Computer Animation IIIRecap: Euler anglesAssignment 5: OpenGLFinal projectSlide 5OverviewQuaternion principleDemoQuaternion recap 1 (wake up)Quaternion AlgebraSlide 11Quaternion Interpolation (velocity)Slide 13Slide 14QuaternionsFun:Julia Sets in Quaternion spaceSlide 17Recap: quaternionsSlide 19Break: movie timeNowParticleVector FieldDifferential EquationsNumeric IntegrationEuler’s MethodOther MethodsParticle in a Force FieldSecond-Order Differential EquationsParticle AnimationParticle Animation [Reeves et al. 1983]Particle Modeling [Reeves et al. 1983]Slide 33Rigid-Body DynamicsNet ForceNet TorqueRigid-Body Equation of MotionSimulations with CollisionsCollision ResponseFrictionless Collision ModelSlide 41Deformable modelsMass-Spring systemExplicit Finite ElementsImplicit Finite ElementsFormally: Finite ElementsCloth animationFluid simulationHow do they animate movies?Slide 50Slide 51Based on your ray tracerLecture 13 6.837 Fall 2002Computer Animation IIIQuaternionsDynamicsSome slides courtesy of Leonard McMillan and Jovan PopovicLecture 11 Slide 2 6.837 Fall 2003Recap: Euler angles3 angles along 3 axisPoor interpolation, lockBut used in flight simulation, etc. because naturalhttp://www.fho-emden.de/~hoffmann/gimbal09082002.pdfLecture 11 Slide 3 6.837 Fall 2003Assignment 5: OpenGLInteractive previsualizationOpenGL APIGraphics hardwareJusr send rendering commandsState machineSolid texturesNew Material subclassOwns two Material* Chooses between them“Shader tree”Lecture 11 Slide 4 6.837 Fall 2003Final projectFirst brainstorming session on ThursdayGroups of threeProposal due Monday 10/27A couple of pagesGoalsProgression Appointment with staffLecture 11 Slide 5 6.837 Fall 2003Final projectGoal-basedSimulate a visual effect Natural phenomenaSmall animationGameReconstruct an existing sceneTechnique-basedMonte-Carlo RenderingRadiosityFluid dynamicsLecture 11 Slide 6 6.837 Fall 2003OverviewInterpolation of rotations, quaternionsEuler anglesQuaternionsDynamicsParticlesRigid bodyDeformable objects( )tx( )tvLecture 11 Slide 7 6.837 Fall 2003Quaternion principleA quaternion = point on unit 3-sphere in 4D = orientation.We can apply it to a point, to a vector, to a rayWe can convert it to a matrixWe can interpolate in 4D and project back onto sphereHow do we interpolate?How do we project?Lecture 11 Slide 8 6.837 Fall 2003DemoFrom Ramamoorthi and Barr Siggraph 97Lecture 11 Slide 9 6.837 Fall 2003Quaternion recap 1 (wake up)4D representation of orientationq = {cos( 2); v sin()}Inverse is q-1 =(s, -v)Multiplication ruleConsistent with rotation compositionHow do we apply rotations?How do we interpolate?( )( )1 2 1 2 1 2 1 2 2 1 1 2,s s v v s v s v v vq q = - + + �r r r r r rgqvLecture 11 Slide 10 6.837 Fall 2003Quaternion AlgebraTwo general quaternions are multiplied by a special rule:Sanity check : {cos(2); v sin()} {cos(); v sin()} {cos()cos() - sin()v. sin()} v, cos( ) sin( ) v + cos()sin() v +v  v}{cos()cos() - sin() sin(), v(cos() sin() + cos( ) sin())}{cos( ), v sin() }( )( )1 2 1 2 1 2 1 2 2 1 1 2,s s v v s v s v v vq q = - + + �r r r r r rgLecture 11 Slide 11 6.837 Fall 2003Quaternion AlgebraTwo general quaternions are multiplied by a special rule:To rotate 3D point/vector p by q, computeq {0; p} q-1p= (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} ( )( )1 2 1 2 1 2 1 2 2 1 1 2,s s v v s v s v v vq q = - + + �r r r r r rg= {c.0- zs, cp+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-(cp+(-sy,sx,0)).(0,0,-s), -zs(0,0,-s)+c(cp+(-sy, sx,0))+ (c p + (-sy,sx,0) ) x (0,0,-s) }= {0, (0,0,zs2)+c2p+(-csy, csx,0)+(-csy, csx, 0)+(s2x, s2y, 0)}= {0, (c2x-2csy-s2x, c2y+2csx-s2y, zs2+sc2)}= {0, x cos( )-y sin(), x sin()+y cos(), z }Lecture 11 Slide 12 6.837 Fall 2003Quaternion Interpolation (velocity)The only problem with linear interpolation (lerp) of quaternions is that it interpolates the straight line (the secant) between the two quaternions and not their spherical distance. As a result, the interpolated motion does not have smooth velocity: it may speed up too much in some sections:Spherical linear interpolation (slerp) removes this problem by interpolating along the arc lines instead of the secant lines.0qq1( )tq( )tqkeyframes lerp slerp( )( )( )( )( )( )0 10 110 1sin 1 sinslerp , , ( ) , sinwhere cost tt tq qq q qq qw www-- += == gLecture 11 Slide 13 6.837 Fall 2003DemoFrom Ramamoorthi and Barr Siggraph 97Lecture 11 Slide 14 6.837 Fall 2003DemoFrom Ramamoorthi and Barr Siggraph 97Lecture 11 Slide 15 6.837 Fall 2003QuaternionsCan also be defined like complex numbers a+bi+cj+dkMultiplication rulesi2=j2=k2=-1ij=k=-jijk=i=-kjki=j=-ik…Lecture 11 Slide 16 6.837 Fall 2003Fun:Julia Sets in Quaternion spaceMandelbrot set: Zn+1=Zn2+Z0Julia set Zn+1=Zn2+Chttp://aleph0.clarku.edu/~djoyce/julia/explorer.htmlDo the same with Quaternions!Rendered by Skal (Pascal Massimino) http://skal.planet-d.net/See also http://www.chaospro.de/gallery/gallery.php?cat=AnimLecture 11 Slide 17 6.837 Fall 2003Fun:Julia Sets in Quaternion spaceJulia set Zn+1=Zn2+CDo the same with Quaternions!Rendered by Skal (Pascal Massimino) http://skal.planet-d.net/This is 4D, so we need the time dimension as wellLecture 11 Slide 18 6.837 Fall 2003Recap: quaternions3 angles represented in 4Dq = {cos( 2); v sin()}Weird multiplication rulesGood interpolation using slerpqv( )( )1 2 1 2 1 2 1 2 2 1 1 2,s s v v s v s v v vq q = - + + �r r r r r rg( )tqslerpLecture 11 Slide 19 6.837 Fall 2003OverviewInterpolation of rotations, quaternionsEuler anglesQuaternionsDynamicsParticlesRigid bodyDeformable objects( )tx( )tvLecture 11 Slide 20 6.837 Fall 2003Break: movie timePixar For the BirdLecture 11 Slide 21 6.837 Fall 2003NowDynamicsACM© 1988 “Spacetime Constraints”Lecture 11 Slide 22 6.837 Fall 2003ParticleA single particle in 2-D moving in a flow fieldPositionVelocityThe flow field function dictatesparticle velocity12xx� �=� �� �x12,vdvdt� �= =� �� �xv v( )tx1x2x( ),tg x( ),t=v g xLecture 11 Slide 23 6.837


View Full Document

MIT 6 837 - Computer Animation III

Documents in this Course
Shadows

Shadows

64 pages

Animation

Animation

37 pages

Radiosity

Radiosity

25 pages

Color

Color

86 pages

InterArch

InterArch

14 pages

Color

Color

15 pages

Animation

Animation

61 pages

Luxo Jr

Luxo Jr

14 pages

Animation

Animation

52 pages

Radiosity

Radiosity

37 pages

Load more
Download Computer Animation III
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Computer Animation III and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Computer Animation III 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?