Fundamentals of Computer Animation Orientation and Rotation.

Slides:



Advertisements
Similar presentations
Animation Following “Advanced Animation and Rendering Techniques” (chapter 15+16) By Agata Przybyszewska.
Advertisements

Chris Hall Aerospace and Ocean Engineering
3D Kinematics Eric Whitman 1/24/2010. Rigid Body State: 2D p.
HCI 530 : Seminar (HCI) Damian Schofield. HCI 530: Seminar (HCI) Transforms –Two Dimensional –Three Dimensional The Graphics Pipeline.
CMPE 466 COMPUTER GRAPHICS
Orientation & Quaternions
Computer Graphics Recitation 2. 2 The plan today Learn about rotations in 2D and 3D. Representing rotations by quaternions.
Ch. 2: Rigid Body Motions and Homogeneous Transforms
3D Coordinate Systems and Transformations Revision 1
3D orientation.
CSCE 689: Computer Animation Rotation Representation and Interpolation
CSCE 441: Computer Graphics Rotation Representation and Interpolation
Quaternions CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2004.
CSCE 641: Computer Graphics Rotation Representation and Interpolation Jinxiang Chai.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Rotation representation and Interpolation
CS 4731: Computer Graphics Lecture 8: 3D Affine transforms Emmanuel Agu.
Orientations Goal: –Convenient representation of orientation of objects & characters in a scene Applications to: – inverse kinematics –rigid body simulation.
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Technical Background.
CS 445 / 645 Introduction to Computer Graphics Lecture 21 Representing Rotations Lecture 21 Representing Rotations.
An Introduction to Robot Kinematics
2IV60 Computer graphics set 4:3D transformations and hierarchical modeling Jack van Wijk TU/e.
CS 450: COMPUTER GRAPHICS 3D TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009.
Mathematical Fundamentals
Rotations and Translations
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
CS 450: COMPUTER GRAPHICS QUATERNIONS SPRING 2015 DR. MICHAEL J. REALE.
Transformation of Graphics
Computer Graphics Bing-Yu Chen National Taiwan University.
Mathematical Foundations Sections A-1 to A-5 Some of the material in these slides may have been adapted from university of Virginia, MIT and Åbo Akademi.
2D Transformation of Graphics
Rotations and Translations
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
Rick Parent - CIS681 ORIENTATION Use Quaternions Interpolating rotations is difficult.
Maths and Technologies for Games Quaternions CO3303 Week 1.
Advanced Computer Graphics Spring 2014
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Rotations and Quaternions Week 9, Wed 29 Oct 2003.
Chapter 2 Rigid Motions and Coordinate Transformations
Transformations of Objects – 3D
Animating Rotations and Using Quaternions. What We’ll Talk About Animating Translation Animating 2D Rotation Euler Angle representation 3D Angle problems.
Rotation and Orientation: Fundamentals Jehee Lee Seoul National University.
CS 551/645 Fall 2000 Parameterized Rotations, Curves, and Surfaces.
What is Kinematics. Kinematics studies the motion of bodies.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 17, 2015 TRANSFORMATIONS AFFINE TRANSFORMATIONS QUATERNIONS.
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk
Affine Geometry.
This Week WeekTopic Week 1 Coordinate Systems, Basic Functions Week 2 Trigonometry and Vectors (Part 1) Week 3 Vectors (Part 2) Week 4 Vectors (Part 3:
Euler Angles This means, that we can represent an orientation with 3 numbers Assuming we limit ourselves to 3 rotations without successive rotations about.
Computer Graphics I, Fall 2010 Transformations.
Week 5 - Monday.  What did we talk about last time?  Lines and planes  Trigonometry  Transforms  Affine transforms  Rotation  Scaling  Shearing.
EE 495 Modern Navigation Systems Navigation Mathematics Rotation Matrices – Part II Wednesday, Jan 14 EE 495 Modern Navigation Systems Slide 1 of 21.
Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.
Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.
Transformations Review 4/18/2018 ©Babu 2009.
Computer Animation Algorithms and Techniques
CPSC 641: Computer Graphics Rotation Representation and Interpolation
CS 445 / 645 Introduction to Computer Graphics
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 TRANSFORMATIONS
Rotations and Quaternions Week 9, Wed 29 Oct 2003
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
UMBC Graphics for Games
A definition we will encounter: Groups
UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN
Presentation transcript:

Fundamentals of Computer Animation Orientation and Rotation

Motivation Finding the most natural and compact way to present rotation and orientations Orientation interpolation which result in a natural motion A closed mathematical form that deals with rotation and orientations (expansion for the complex numbers)

Rotation Matrix A general rotation can be represented by a single 3x3 matrix –Length Preserving (Isometric) –Reflection Preserving –Orthonormal

Fixed Angle Representation Angles used to rotate about fixed axes Orientations are specified by a set of 3 ordered parameters that represent 3 ordered rotations about fixed axes, ie. first about x, then y, then z Many possible orderings, don’t have to use all 3 axes, but can’t do the same axis back to back

Fixed Angle Representation A rotation of 10,45, 90 would be written as –Rz(90) Ry(45), Rx(10) since we want to first rotate about x, y, z. It would be applied then to the point P…. RzRyRx P Problem occurs when two of the axes of rotation line up on top of each other. This is called “Gimbal Lock”

Gimbal Lock A 90 degree rotation about the y axis essentially makes the first axis of rotation align with the third. Incremental changes in x,z produce the same results – you’ve lost a degree of freedom

Gimbal Lock Phenomenon of two rotational axis of an object pointing in the same direction. Simply put, it means your object won't rotate how you think it ought to rotate.

Euler Angles A general rotation is a combination of three elementary rotations: around the x-axis (x-roll), around the y-axis (y-roll) and around the z-axis (z- roll).

Euler Angles

Euler Angles and Rotation Matrices

Gimbal Lock (again!) Rotation by 90 o causes a loss of a degree of freedom x y z 11 y z 11  /2 11 x’ y z 33 11 xx

Gimbal Lock Phenomenon of two rotational axis of an object pointing in the same direction. Simply put, it means your object won't rotate how you think it ought to rotate.

Euler angles interpolation z x y π x-roll π y z x y z x z-roll π z x y π z x y π y-roll π R(0,0,0),…,R(  t,0,0),…,R( ,0,0) t  [0,1] R(0,0,0),…,R(0,  t,  t),…,R(0, ,  )

Euler Angles Interpolation  Unnatural movement !

Goal Find a parameterization in which –a simple steady rotation exists between two key orientations –moves are independent of the choice of the coordinate system

Angular displacement ( ,n) defines an angular displacement of  about an axis n

Angle and Axis Any orientation can be represented by a 4-tuple –angle, vector(x,y,z) where the angle is the amount to rotate by and the vector is the axis to rotate about Can interpolate the angle and axis separately No gimbal lock problems! But, can’t efficiently compose rotations…must convert to matrices first!

Quaternions ? Extend the concept of rotation in 3D to 4D. Avoids the problem of "gimbal-lock" and allows for the implementation of smooth and continuous rotation. In effect, they may be considered to add a additional rotation angle to spherical coordinates ie. Longitude, Latitude and Rotation angles A Quaternion is defined using four floating point values |x y z w|. These are calculated from the combination of the three coordinates of the rotation axis and the rotation angle.

How do quaternions relate to 3D animation? Solution to "Gimbal lock" Instead of rotating an object through a series of successive rotations, a quaternion allows the programmer to rotate an object through a single arbitary rotation axis. Because the rotation axis is specifed as a unit direction vector, it may be calculated through vector mathematics or from spherical coordinates ie (longitude/latitude). Quaternions interpolation : smooth and predictable rotation effects.

Quaternion to Rotation Matrix

Quaternions Definition Extension of complex numbers 4-tuple of real numbers –s,x,y,z or [s,v] –s is a scalar –v is a vector Same information as axis/angle but in a different form Can be viewed as an original orientation ora rotation to apply to an object

Quaternions Math

The conjugate and magnitude are similar to complex numbers Quaternions properties Quaternions are non commutative q 1 = (s 1,v 1 ) q 2 = (s 2,v 2 ) q 1 *q 2 = (s 1 s 2 – v 1. v 2, s 1 v 2 + s 2 v 1 + v 1 x v 2 ) inverse: unit quaternion:

Quaternion Rotation To rotate a vector, v using quaternion math –represent the vector as [0,v] –represent the rotation as a quaternion, q

Quaternions as Rotations Rotation of P=(0,r) about the unit vector n by an angle θ using the unit quaternion q=(s,v) but q=(cos ½ θ, sin ½ θ n) where |n|=1

Quaternions as Rotations Concatenating rotations – rotate using q 1 and then using q 2 is like rotation using q 2 *q 1

Rotations in Reality It’s easiest to express rotations in Euler angles or Axis/angle We can convert to/from any of these representations Choose the best representation for the task –input:Euler angles –interpolation: quaternions –composing rotations: quaternions, orientation matrix