Download presentation
Presentation is loading. Please wait.
1
University of British Columbia © MIchiel van de Panne An Introduction to Computer Animation Michiel van de Panne
2
© Michiel van de Panne University of British Columbia Overview (1)Creating Animations (2)Representing Rotations
3
© Michiel van de Panne University of British Columbia (1) Creating Animations algorithm userdata (parameterized models, physics, optimization) (keyframes) (motion capture)
4
© Michiel van de Panne University of British Columbia Representing motion DOF vs timeDOF vs time cubic polynomial curvescubic polynomial curves t x in-out fast linear smooth alternative for motion through space:alternative for motion through space: x y + v t apply arc-length reparameterization
5
© Michiel van de Panne University of British Columbia (2) Representing Rotations torso head RUarm RLarm Rhand RUleg RLleg Rfoot LUarm LLarm Lhand LUleg LLleg Lfootworld trans(0.30,0,0) rot(z, )
6
© Michiel van de Panne University of British Columbia Transformation Hierarchies Example x y glTranslate3f(x,y,0); glRotatef(,0,0,1); DrawBody();glPushMatrix(); glTranslate3f(0,7,0); glTranslate3f(0,7,0); DrawHead(); DrawHead();glPopMatrix();glPushMatrix(); glTranslate(2.5,5.5,0); glTranslate(2.5,5.5,0); glRotatef(,0,0,1); glRotatef(,0,0,1); DrawUArm(); DrawUArm(); glTranslate(0,-3.5,0); glTranslate(0,-3.5,0); glRotatef(,0,0,1); glRotatef(,0,0,1); DrawLArm(); DrawLArm();glPopMatrix();... (draw other arm)
7
© Michiel van de Panne University of British Columbia Rotation DOFs 2D: 1 DOF2D: 1 DOF 3D: 3 DOF3D: 3 DOF 4D: 6 DOF4D: 6 DOF
8
© Michiel van de Panne University of British Columbia Transformations Rotation glRotatef(angle,x,y,z);glRotated(angle,x,y,z);
9
© Michiel van de Panne University of British Columbia 3x3 Rotation Matrix
10
© Michiel van de Panne University of British Columbia 3x3 Rotation Matrix 9 elements9 elements 6 constraints6 constraints renormalization algorithmsrenormalization algorithms extracting pure rotational component (polar decomp)extracting pure rotational component (polar decomp)... and determinant = 1
11
© Michiel van de Panne University of British Columbia Rotations SO(3) rotations do not commuterotations do not commute require at least 4 parameters for a smooth parameterizationrequire at least 4 parameters for a smooth parameterization –analogy: surface of the earth 2D surface, 3 params combing the hairy ballcombing the hairy ball –camera orientation: view object from any dir
12
© Michiel van de Panne University of British Columbia Rotations orientation vs rotation?orientation vs rotation? how to specify?how to specify? how to interpolate?how to interpolate? 2D vs 3D2D vs 3D
13
© Michiel van de Panne University of British Columbia Fixed Angle Representations fixed sequence of 3 rotationsfixed sequence of 3 rotations –RPY orientation: rollpitchyaw can use many ordering of axescan use many ordering of axes Euler angles:Euler angles:
14
© Michiel van de Panne University of British Columbia Euler’s Rotation Theorem can always go from one orientation to another with one rotation about a single axiscan always go from one orientation to another with one rotation about a single axis 180 deg about line in xy-plane where
15
© Michiel van de Panne University of British Columbia Quaternions review of complex numbersreview of complex numbers quaternionsquaternions
16
© Michiel van de Panne University of British Columbia Quaternions rotation of a vectorrotation of a vector two successive rotationstwo successive rotations
17
© Michiel van de Panne University of British Columbia Quaternions RH rule unit quaternionsunit quaternions additionaddition multiplicationmultiplication
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.