This week CENG 732 Computer Animation Spring 2006-2007 Week 2 Technical Preliminaries and Introduction to Keframing Recap from CEng 477 The Displa Pipeline Basic Transformations / Composite Transformations Round-off Error Considerations Orientation representations Basic Orientation Interpolation Eample The Displa Pipeline Ra Casting Displa Pipeline Object Lines of sight emanating from observer Ee World Object Virtual frame buffer Ra constructed through piel center Ee at negative infinit World Parallel lines of sight Image Screen Screen Animation Animation is tpicall produced b the following: Modifing the position and orientation of objects in world space over time; modifing the shape of objects over time; modifing displa attributes of objects over time; transforming the observer position and orientation in world space over time; or some combination of these transformations Appling Transformations to Points Points are represented in homogenous coordinates and the transformation matri is left multiplied b the column vector that represents the point 1
Composite Transformations A series of transformations can be multiplied together to produce a compound (or composite) transformation. Basic Transformations Translation Scaling Rotations around major aes Translation Scaling Rotation around -ais Rotation around -ais 2
Rotation around -ais Rotations: an alternative method The desired rotation defines a unit coordinate sstem Etracting Transformations from a Matri Round-off Errors Assume ou want to rotate a sphere around the origin. How would ou do that? Three different was Approach 1 Appl a delta -ais rotation to the points on the sphere each frame Appl a delta -ais rotation to the transformation matri and then appl it to the points Add a delta value to an angle variable and construct the transformation matri from scratch each frame 3
Approach 2 Approach 3 Orientation Representation How do we represent the arbitrar orientation of an object in 3D space? Does that representation allow for interpolation if we want to interpolate the in-between frames of two given keframes (ke-orientations) of the object? Orientation Representation Transformation Matri Representation Fied Angle Representation Euler Angle Representation Ais-Angle Representation Eample on Ais-Angle Representation Quaternion Representation Transformation Matri Representation Fied Angle Representation Rotate about global aes in a fied order Rotating about global aes is what the rotation matrices do Can use an triple of aes Rotate about, then, then (10, 90, -45) 4
Fied Angle Representation Gimbal Lock Euler Angle Representation Equivalence of Fied angles and Euler angles Rotate about local aes of object Roll, Pitch, Yaw (10, 90, -45) Angle and Ais Representation Euler s Theorem Euler s rotation theorem One orientation can be derived from another b a single rotation about an ais So, we can use an ais and a single angle to represent an orientation (with respect to the object s initial orientation) We can implement interpolation in this representations Orientation A Orientation B Angle and ais of rotation 5
Interpolation Using Ais-Angle Representation Eample Quaternions Similar to ais-angle representations quaternions can be used to represent orientation with four values (a scalar and a 3D vector) Representing Rotations Using Quaternions [s,,,] or [s,v] Basic Quaternion Math Unit-length Quaternion [s 1,v 1 ]+[s 2,v 2 ] = [s 1 +s 2,v 1 +v 2 ] 6
Quaternions Quaternion representation both allow for interpolation between arbitrar orientations and for representation of a series of rotations Rotating Vectors Using Quaternions Interpolation of Rotations using Quaternion Representation Interpolation of Rotations using Quaternion Representation 7