Week 5 - Monday.  What did we talk about last time?  Lines and planes  Trigonometry  Transforms  Affine transforms  Rotation  Scaling  Shearing.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

Affine Transformations
Transformations Ed Angel Professor Emeritus of Computer Science
CS 691 Computational Photography Instructor: Gianfranco Doretto Image Warping.
Computer Graphics Lecture 4 Geometry & Transformations.
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.
2D Geometric Transformations
Chapter 4.1 Mathematical Concepts
Orientation & Quaternions
Computer Graphics Recitation 2. 2 The plan today Learn about rotations in 2D and 3D. Representing rotations by quaternions.
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
Ch. 2: Rigid Body Motions and Homogeneous Transforms
3D Coordinate Systems and Transformations Revision 1
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
3-D Geometry.
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.
Computer Graphics (Fall 2008) COMS 4160, Lecture 3: Transformations 1
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Rotation representation and Interpolation
Computer Graphics (Fall 2004) COMS 4160, Lecture 3: Transformations 1
Orientations Goal: –Convenient representation of orientation of objects & characters in a scene Applications to: – inverse kinematics –rigid body simulation.
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
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 450: Computer Graphics 2D TRANSFORMATIONS
Week 4 - Monday.  What did we talk about last time?  Vectors.
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.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1
Rotations and Translations
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
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.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
Computer Graphics Bing-Yu Chen National Taiwan University.
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.
Advanced Computer Graphics Spring 2014
Chapter 2 Rigid Motions and Coordinate Transformations
Geometric Objects and Transformation
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.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 17, 2015 TRANSFORMATIONS AFFINE TRANSFORMATIONS QUATERNIONS.
Transformations CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 3: Transformations 1
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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
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.
Transformations. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
Week 4 - Monday CS361.
CPSC 641: Computer Graphics Rotation Representation and Interpolation
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 TRANSFORMATIONS
(c) University of Wisconsin, CS559
UMBC Graphics for Games
UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN
Presentation transcript:

Week 5 - Monday

 What did we talk about last time?  Lines and planes  Trigonometry  Transforms  Affine transforms  Rotation  Scaling  Shearing  Concatenation of transforms

 The matrix used to transform points will not always work on surface normals  Rotation is fine  Uniform scaling can stretch the normal (which should be unit)  Non-uniform scaling distorts the normal  Transforming by the transpose of the adjoint always gives the correct answer  In practice, the transpose of the inverse is usually used

 Because of the singular value theorem, we can write any square, real-valued matrix M with positive determinant as:  M = R 1 SR 2  where R 1 and R 2 are rotation matrices and S is a scaling matrix  (M -1 ) T = ((R 1 SR 2 ) -1 ) T = (R 2 -1 S -1 R 1 -1 ) T = (R 1 -1 ) T (S -1 ) T (R 2 -1 ) T = R 1 S -1 R 2  Rotations are fine for the normals, but non-uniform scaling will distort them  The transpose of the inverse distorts the scale in the opposite direction

1. With homogeneous notation, translations do not affect normals at all 2. If only using rotations, you can use the regular world transform for normals 3. If using rotations and uniform scaling, you can use the world transform for normals  However, you'll need to normalize your normals so they are unit 4. If using rotations and non-uniform scaling, use the transpose of the inverse or the transpose of the adjoint  They only differ by a factor of the determinant, and you'll have to normalize your normals anyway

 For normals and other things, we need to be able to compute inverses  Rigid body inverses were given before  For a concatenation of simple transforms with known parameters, the inverse can be done by inverting the parameters and reversing the order: ▪ If M = T(t)R(  ) then M -1 = R(-  )T(-t)  For orthogonal matrices, M -1 = M T  If nothing is known, use the adjoint method

 We can describe orientations from some default orientation using the Euler transform  The default is usually looking down the –z axis with "up" as positive y  The new orientation is:  E(h, p, r) = R z (r)R x (p)R y (h)  h is head, like shaking your head "no" ▪ Also called yaw  p is pitch, like nodding your head back and forth  r is roll… the third dimension

 One trouble with Euler angles is that they can exhibit gimbal lock  In gimbal lock, two axes become aligned, causing a degree of freedom to be lost  Euler angles can describe orientations in multiple ways, however the wrong choice of rotations may cause gimbal lock

 Sometimes you want to rotate around some arbitrary axis r  To do so, create an orthonormal basis r, s, and t as follows  Take the smallest component of r and set it to 0  Swap the two remaining components and negate the first one  Divide the result by its norm, making it a normal vector s  Let t = r x s  This basis can be made into a matrix M  The final transform X transforms the r-axis to the x-axis, does the rotation by α and then transforms back to r  X = M T R x (α)M

 Quaternions are a compact way to represent orientations  Pros:  Compact (only four values needed)  Do not suffer from gimbal lock  Are easy to interpolate between  Cons:  Are confusing  Use three imaginary numbers  Have their own set of operations

 A quaternion has three imaginary parts and one real part  We use vector notation for quaternions but put a hat on them  Note that the three imaginary number dimensions do not behave the way you might expect

 Multiplication  Addition  Conjugate  Norm  Identity

 Inverse  One (useful) conjugate rule:  Note that scalar multiplication is just like scalar vector multiplication for any vector  Quaternion quaternion multiplication is associative but not commutative  For any unit vector u, note that the following is a unit quaternion:

 Take a vector or point p and pretend its four coordinates make a quaternion  If you have a unit quaternion the result of is p rotated around the u axis by 2   Note that, because it's a unit quaternion,  There are ways to convert between rotation matrices and quaternions  The details are in the book

 Short for spherical linear interpolation  Using unit quaternions that represent orientations, we can slerp between them to find a new orientation at time t = [0,1], tracing the path on a unit sphere between the orientations  To find the angle  between the quaternions, you can use the fact that cos  = q x r x + q y r y + q z r z + q w r w

 Vertex blending  Morphing  Projections

 Keep reading Chapter 4  Exam 1 next Friday