Orientations Goal: –Convenient representation of orientation of objects & characters in a scene Applications to: – inverse kinematics –rigid body simulation.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

John C. Hart CS 318 Interactive Computer Graphics
CS B659: Principles of Intelligent Robot Motion Rigid Transformations.
Animation Following “Advanced Animation and Rendering Techniques” (chapter 15+16) By Agata Przybyszewska.
3D Graphics for Game Programming (J. Han) Chapter XI Character Animation.
3D Kinematics Eric Whitman 1/24/2010. Rigid Body State: 2D p.
Orientation & Quaternions
Computer Graphics Recitation 2. 2 The plan today Learn about rotations in 2D and 3D. Representing rotations by quaternions.
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
CSCE 641: Computer Graphics Rotation Representation and Interpolation Jinxiang Chai.
Rotation representation and Interpolation
Screw Rotation and Other Rotational Forms
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.
CS I400/B659: Intelligent Robotics Rigid Transformations.
10/5/04© University of Wisconsin, CS559 Fall 2004 Last Time Compositing Painterly Rendering Intro to 3D Graphics Homework 3 due Oct 12 in class.
CS 450: COMPUTER GRAPHICS 3D TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
Computer Vision Group Prof. Daniel Cremers Autonomous Navigation for Flying Robots Lecture 3.1: 3D Geometry Jürgen Sturm Technische Universität München.
ME/ECE Professor N. J. Ferrier Forward Kinematics Professor Nicola Ferrier ME Room 2246,
Point set alignment Closed-form solution of absolute orientation using unit quaternions Berthold K. P. Horn Department of Electrical Engineering, University.
1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009.
Rotations and Translations
Game Physics – Part IV Moving to 3D
Mathematical Topics Review of some concepts:  trigonometry  aliasing  coordinate systems  homogeneous coordinates  matrices, quaternions.
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.
Representing Transformations, The TRANSF Package Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday,
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 13, 2002 Day 16.
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.
1 CS 430/536 Computer Graphics I 3D Transformations World Window to Viewport Transformation Week 2, Lecture 4 David Breen, William Regli and Maxim Peysakhov.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
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.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Math Review.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
3D Game Engine Design 1 3D Game Engine Design Ch D MAP LAB.
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.
Week 5 - Monday.  What did we talk about last time?  Lines and planes  Trigonometry  Transforms  Affine transforms  Rotation  Scaling  Shearing.
1 Dr. Scott Schaefer Quaternions and Complex Numbers.
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.
Fundamentals of Computer Animation Orientation and Rotation.
REFERENCE: QUATERNIONS/ Ogre Transformations.
CGDD 4003 Character Animation. The Skeletal Hierarchy (aka the “rig”) Based on the concept of bones Each bone has exactly one parent Each bone has a transform.
Sect. 4.5: Cayley-Klein Parameters 3 independent quantities are needed to specify a rigid body orientation. Most often, we choose them to be the Euler.
Computer Animation Algorithms and Techniques
CPSC 641: Computer Graphics Rotation Representation and Interpolation
CS 445 / 645 Introduction to Computer Graphics
3D Geometric Transformation
Review: Transformations
3D Transformations Source & Courtesy: University of Wisconsin,
Review: Transformations
Rotation representation and Interpolation
(c) University of Wisconsin, CS559
UMBC Graphics for Games
A definition we will encounter: Groups
CSCE441: Computer Graphics 2D/3D Transformations
UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN
Rotation and Orientation: Fundamentals
Presentation transcript:

Orientations Goal: –Convenient representation of orientation of objects & characters in a scene Applications to: – inverse kinematics –rigid body simulation –rag doll physics –etc.

Euler Angles …so far, used one angle per axis, ie. Euler angles. Pros: –Simple! Cons: –Singularities (“gimbal lock”) –Interpolation is tricky –Composing rotations is tricky

Singularities Singularities may arise when axes are rotated to coincide Lose a degree of freedom Consider an airplane’s roll-pitch-yaw –eg. (0,90,0) vs. (90,90,90) – identical position IK problems: –Infinitely many solutions if coincident –Ill-posed when very close to coincident

Interpolation Vital for keyframe animation, blending mocap data, etc. Linear interpolating each angle independently gives odd behaviour near singularities Not “coordinate independent” –For 2 orientations, rotate-interpolate gives a different result than interpolate-rotate

Composition Given two rotations applied sequentially, find a single orientation that gives the same result. Not at all obvious how to handle this

3x3 Orthogonal Matrices Eliminate many issues of Euler angles, but… –Hard to work with: 9 components, 6 constraints –Highly redundant –Linear interpolation doesn’t work

3x3 Orthogonal Matrices But: – Very effective for quickly transforming many points –Composition is straightforward – multiply Still useful, but not as our primary representation

Axis-angle Unit axis vector and an angle indicating how much to rotate. Very intuitive 4 numbers, 1 constraint – less redundant Comparison, interpolation, composition still difficult.

2D Rotations Can use complex numbers to represent 2D rotations View a point (x,y) as x+ i*y Rotation about origin is multiplication by: –cos(theta) + i*sin(theta) Equivalently, e^(i*theta) –ie. A unit magnitude complex number

2D Rotations And composition is again multiplication Isn’t this overkill? –In 2D, yes –But this idea extends elegantly to 3D

Quaternions Generalizes complex numbers Two additional sqrt(-1) terms, j and k Form: a + bi + cj + dk Behave mostly like regular numbers: –But NOT commutative! a*b ≠ b*a

Quaternions Small set of simple multiplication rules: i*i = -1, j*j = -1, k*k = -1 i*j = k, j*k = i, k*i = j j*i = -k, k*j=-i, i*k = -j When j & k components are 0, this reverts to basic complex numbers –ie. 2D rotations.

Rotating points Given complex number: Conjugate is: Then: If q is unit magnitude, just gives back 0 + ix Real part remains 0, imaginary part retains its length, x

Rotating points Quaternion: Conjugate: Zero real-part quaternion: Consider: Real part stays 0, imaginary part keeps length For unit q, this is a rotation of the vector (x,y,z) in quaternion form

Quaternion Rotation So, to perform a rotation by unit quaternion q on vector v = (x,y,z) to get new vector v’ = (x’,y’,z’) just do:

Quaternion Rotation Unit-length quaternions can represent any orientation in 3D, without singularities Relation to axis-angle form: –Real part is cos(theta/2) –Imaginary part is vector parallel to the rotation axis Redundancy: q = -q –But since the two possible representations are maximally far apart, no harm done.

Quaternion Interpolation Interpolation is much more convenient –linear interpolating, then renormalizing q to unit-length works fairly well –For better results, ensure dot product of their imaginary parts is non-negative,by flipping sign, since q = -q is the same orientation. We want the two quaternion’s “axes” to be pointing in the same direction, so that the interpolation path is as short as possible. For improved interpolation of unit vectors, look into “slerp”

Quaternion Composition Similar to matrix form, just multiply Consider 2 quaternion rotations applied to a point 0+ix+jy+kz or