Representations and Transformations. Objectives

Similar documents
Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

CS452/552; EE465/505. Geometry Transformations

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

Note 2: Transformation (modeling and viewing)

Motion Control (wheeled robots)

CS354 Computer Graphics Rotations and Quaternions

Fundamentals of Computer Animation

A SIMPLE IMPERATIVE LANGUAGE THE STORE FUNCTION NON-TERMINATING COMMANDS

Advanced Encryption Standard and Modes of Operation

Computer Graphics. Transformation

Rotations in 3D Graphics and the Gimbal Lock

CS 445 / 645 Introduction to Computer Graphics. Lecture 21 Representing Rotations

Quaternion Interpolation

Orientation & Quaternions

CS184: Using Quaternions to Represent Rotation

An Intro to LP and the Simplex Algorithm. Primal Simplex

CS230 : Computer Graphics Lecture 12: Introduction to Animation. Tamar Shinar Computer Science & Engineering UC Riverside

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala

3D Transformations. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 11

KS3 Maths Assessment Objectives

Transformations. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Motivation. Parametric Curves (later Surfaces) Outline. Tangents, Normals, Binormals. Arclength. Advanced Computer Graphics (Fall 2010)

Lecture 14: Minimum Spanning Tree I

C O M P U T E R G R A P H I C S. Computer Graphics. Three-Dimensional Graphics I. Guoying Zhao 1 / 52

Objectives. transformation. General Transformations. Affine Transformations. Notation. Pipeline Implementation. Introduce standard transformations

3D Transformations. CS 4620 Lecture 10. Cornell CS4620 Fall 2014 Lecture Steve Marschner (with previous instructors James/Bala)

Topics. Lecture 37: Global Optimization. Issues. A Simple Example: Copy Propagation X := 3 B > 0 Y := 0 X := 4 Y := Z + W A := 2 * 3X

Drawing Lines in 2 Dimensions

Quaternions and Rotations

Routing Definition 4.1

MAT 155: Describing, Exploring, and Comparing Data Page 1 of NotesCh2-3.doc

Quaternions and Rotations

The norm Package. November 15, Title Analysis of multivariate normal datasets with missing values

Lecture Outline. Global flow analysis. Global Optimization. Global constant propagation. Liveness analysis. Local Optimization. Global Optimization

12.1 Quaternions and Rotations

Lens Conventions From Jenkins & White: Fundamentals of Optics, pg 50 Incident rays travel left to right Object distance s + if left to vertex, - if

Geometric Transformations Hearn & Baker Chapter 5. Some slides are taken from Robert Thomsons notes.

Transformations: 2D Transforms

Computer Animation Fundamentals. Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics

Lens Conventions From Jenkins & White: Fundamentals of Optics, pg 50 Incident rays travel left to right Object distance s + if left to vertex, - if

Karen L. Collins. Wesleyan University. Middletown, CT and. Mark Hovey MIT. Cambridge, MA Abstract

AN ALGORITHM FOR RESTRICTED NORMAL FORM TO SOLVE DUAL TYPE NON-CANONICAL LINEAR FRACTIONAL PROGRAMMING PROBLEM

A METHOD OF REAL-TIME NURBS INTERPOLATION WITH CONFINED CHORD ERROR FOR CNC SYSTEMS

Operational Semantics Class notes for a lecture given by Mooly Sagiv Tel Aviv University 24/5/2007 By Roy Ganor and Uri Juhasz

Transformation. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

Motivation: Level Sets. Input Data Noisy. Easy Case Use Marching Cubes. Intensity Varies. Non-uniform Exposure. Roger Crawfis

Geometric Transformations

Coordinate Transformations. Coordinate Transformation. Problem in animation. Coordinate Transformation. Rendering Pipeline $ = $! $ ! $!

3D SMAP Algorithm. April 11, 2012

3D Mathematics. Co-ordinate systems, 3D primitives and affine transformations

Lecture 9: Transformations. CITS3003 Graphics & Animation

Quaternions and Rotations

Today. Today. Introduction. Matrices. Matrices. Computergrafik. Transformations & matrices Introduction Matrices

Lecture 4: Transformations and Matrices. CSE Computer Graphics (Fall 2010)

Quaternions and Rotations

Delaunay Triangulation: Incremental Construction

Jorg s Graphics Lecture Notes Coordinate Spaces 1

Gray-level histogram. Intensity (grey-level) transformation, or mapping. Use of intensity transformations:

IMAGE-BASED RENDERING AND ANIMATION

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects

3D Rotations and Complex Representations. Computer Graphics CMU /15-662, Fall 2017

Objects, Classes, and Inheritance

REVERSE KINEMATIC ANALYSIS OF THE SPATIAL SIX AXIS ROBOTIC MANIPULATOR WITH CONSECUTIVE JOINT AXES PARALLEL

Visual Recognition: Image Formation

Advanced Computer Graphics Transformations. Matthias Teschner

Quadrilaterals. Learning Objectives. Pre-Activity

Course Updates. Reminders: 1) Assignment #13 due Monday. 2) Mirrors & Lenses. 3) Review for Final: Wednesday, May 5th

xy-monotone path existence queries in a rectilinear environment

CS612 - Algorithms in Bioinformatics

Analyzing Hydra Historical Statistics Part 2

Autonomous Navigation for Flying Robots

Quaternions & Rotation in 3D Space

Visualizing Quaternions

Kinematics Programming for Cooperating Robotic Systems

Minimum congestion spanning trees in bipartite and random graphs

A New Approach to Pipeline FFT Processor

Universität Augsburg. Institut für Informatik. Approximating Optimal Visual Sensor Placement. E. Hörster, R. Lienhart.

Planning of scooping position and approach path for loading operation by wheel loader

VLSI Design 9. Datapath Design

Kinematics and Orientations

To Do. Outline. Translation. Homogeneous Coordinates. Foundations of Computer Graphics. Representation of Points (4-Vectors) Start doing HW 1

Laboratory Exercise 6

Edits in Xylia Validity Preserving Editing of XML Documents

Vector Algebra Transformations. Lecture 4

3D Transformations World Window to Viewport Transformation Week 2, Lecture 4

Geometry. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Transformations Week 9, Lecture 18

Transformations. Standard Transformations. David Carr Virtual Environments, Fundamentals Spring 2005 Based on Slides by E. Angel

1 The secretary problem

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

Geometry. Prof. George Wolberg Dept. of Computer Science City College of New York

Shortest Paths Problem. CS 362, Lecture 20. Today s Outline. Negative Weights

Transformations. Overview. Standard Transformations. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E.

Last week. Machiraju/Zhang/Möller/Fuhrmann

3D Transformations and Complex Representations. Computer Graphics CMU /15-662, Fall 2016

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1

Quaternions and Euler Angles

Inverse Kinematics 1 1/29/2018

Transcription:

Repreentation and Tranformation Objective Derive homogeneou coordinate tranformation matrice Introduce tandard tranformation - Rotation - Tranlation - Scaling - Shear

Scalar, Point, Vector Three baic element from geometry: Scalar, Point, Vector Scalar can be defined a member of a et which can be combined by the operation of addition and multiplication and obey the fundamental axiom: aociativity, commutivity, inverion Example include the real and complex number under the rule we are all familiar with Scalar alone have no geometric propertie Scalar, Point, Vector A vector i a quantity with two attribute direction & magnitude and it own rule a we aw lat lecture The et define a vector pace But, vector lack poition Same length and magnitude -> Vector are inufficient to pecify geometry We need point 4

Point and Vector Point, we know, are location in pace Certain operation tranlate between point and vector - Point-point ubtraction yield a vector - Lead to equivalent to point-vector addition v=p-q P=v+Q 5 Vector Space Conider a bai v, v,., v n A vector i written v= v + v +.+ n v n The lit of calar {,,. n } then i the repreentation of v with repect to the given bai And we write the repreentation a a row or column array of calar a=[. n ] T =. n 6

Affine Space Vector pace do not repreent point Intead, we work in an affine pace and add a pecial point, the origin, to the bai vector, thi i called a frame v P v v 7 Affine Space An affine pace i both point and vector pace It allow operation from vector, point and calar: - Vector-vector addition - Scalar-vector multiplication - Point-vector addition - All calar-calar operation Define our pace with a coordinate Frame 8 4

Affine Space A frame i determined by (P, v, v, v,... ) Within thi frame: Every vector can be written a v= v + v +.+ n v n And every point can be written a P = P + v + v +.+ n v n 9 Homogeneou Coordinate Conider the point and the vector P = P + v + v +.+ n v n v= v + v +.+ n v n They appear to have the imilar repreentation p=[ ] v=[ ] v which confue the point with the vector p But, a vector ha no poition v can be placed anywhere fixed 5

Homogeneou Coordinate An affine pace ditinguihe point and vector with ( )( P ) = P ( )( P ) = (zero vector) Homogeneou Coordinate With thee rule, we can keep track of the difference: v= v + v + v = [ ][v v v P ] T P = P + v + v + v = [ ][v v v P ] T Thu we obtain a four-dimenional repreentation for both: v = [ ] T p = [ ] T 6

Homogeneou Coordinate Homogeneou coordinate are key to all computer graphic ytem Hardware pipeline all work with 4 dimenional repreentation All tandard tranformation (rotation, tranlation, caling) can be implemented by matrix multiplication with 4 x 4 matrice Homogeneou Coordinate Mot generally, the form of homogeneou coordinate i p=[x y z w] T We can return to a imple three dimenional point by x'x/w y'y/w z'z/w But if w=, the repreentation i that of a vector 4 7

Tranformation A tranformation map point to other point and/or vector to other vector v=t(u) Q=T(P) 5 Affine Tranformation Line preerving Characteritic of many phyically important tranformation - Rigid body tranformation: rotation, tranlation - Non-rigid: Scaling, hear Importance in graphic i that we need only tranform vertice (point) of line egment and polygon, then ytem draw between the tranformed point 6 8

Tranlation Move (tranlate, diplace) a point to a new location P P d Diplacement determined by a vector d - Three degree of freedom -P =P+d 7 Moving object When we move a point on an object to a new location, to preerve the object, we mut move all other point on the object in the ame way object tranlation: every point diplaced by the ame vector, d 8 9

Tranlation Uing Repreentation Uing the homogeneou coordinate repreentation in ome frame p=[ x y z ] T p =[x y z ] T d=[dx dy dz ] T Hence p = p + d or x =x+d x y =y+d y z =z+d z note that thi expreion i in four dimenion and expree that point = vector + point 9 Tranlation Matrix We can alo expre tranlation uing a 4 x 4 matrix T in homogeneou coordinate p =Tp where dx d T = T(d x, d y, d z ) = y dz Thi form i better for implementation becaue all affine tranformation can be expreed thi way and multiple tranformation can be concatenated together

Rotation (D) Conider rotation about the origin by degree - radiu tay the ame, angle increae by What i thi rotation about the z axi? Rotation (D) Conider rotation about the origin by degree - radiu tay the ame, angle increae by x = r co ( y = r in ( x =x co y in y = x in + y co x = r co y = r in

Rotation about the z axi Rotation about z axi in three dimenion leave all point with the ame z - Equivalent to rotation in two dimenion in plane of contant z x =x co y in y = x in + y co z =z - or in matrix notation (with p a a column) p =R z ()p Rotation Matrix Homogeneou Coordinate: R = R z () = co in in co 4

Rotation about x and y axe Same argument a for rotation about z axi - For rotation about x axi, x i unchanged - For rotation about y axi, y i unchanged co - in R = R x () = in co R = R y () = co - in in co 5 Scaling Expand or contract along each axi (fixed point of origin) x = x x y = y y z = z z p =Sp S = S( x, y, z ) = x y z 6

Reflection correpond to negative cale factor x = - y = original x = - y = - x = y = - 7 Shear Helpful to add one more baic tranformation Equivalent to pulling face in oppoite direction 8 4

Shear Matrix Conider imple hear along x axi x = x + y h y y = y z = z H() = hy 9 Invere Although we could compute invere matrice by general formula, we can alo ue imple geometric obervation, for example: - Tranlation: T - (d x, d y, d z ) = T(-d x, -d y, -d z ) - Rotation: R - () = R(-) Hold for any rotation matrix Note that ince co(-) = co() and in(-)= -in() R - () = R T () - Scaling: S - ( x, y, z ) = S(/ x, / y, / z ) 5

Compoite In modeling, we often tart with a imple object centered at the origin, oriented with the axi, and at a tandard ize We apply an compoite tranformation to it vertice to Scale Orient Locate Compoite Tranformation Scaling about a fixed point - Simply applying the cale tranformation alo move the object being caled. Q Q' P P' 6

Compoite Tranformation Scaling about origin doe not move object Origin i a fixed point for the cale tranformation We ue compoite tranformation to create cale tranformation with different fixed point Q Q' P P' Compoite Tranformation Fixed point cale tranformation Move fixed point (px,py,pz) to origin Scale by deired amount Move fixed point back to original poition M = T(px, py, pz) S( x, y, z ) T(-px, -py, -pz) 4 7

Compoite Tranformation Rotating about a fixed point - baic rotation alone will rotate about origin but we want: 5 Compoite Tranformation Rotating about a fixed point Move fixed point (px,py,pz) to origin Rotate by deired amount Move fixed point back to original poition M = T(px, py, pz) R x () T(-px, -py, -pz) 6 8

Compoite Tranformation 7 Compoite tranformation A erie of tranformation on an object can be applied a a erie of matrix multiplication : poition in the global coordinate : poition in the local coordinate 8 9

Interpolation In order to move thing, we need both tranlation and rotation Interpolating the tranlation i eay, but what about rotation? 9 Interpolation of orientation How about interpolating each entry of the rotation matrix? The interpolated matrix might no longer be orthonormal, leading to nonene for the in-between rotation 4

Interpolation of orientation Example: interpolate linearly from a poitive 9 degree rotation about y axi to a negative 9 degree rotation about y Linearly interpolate each component and halfway between, you get thi... 4 Motivation Finding the mot natural and compact way to preent rotation and orientation Orientation interpolation which reult in a natural motion A cloed mathematical form that deal with rotation and orientation (expanion for the complex number) 4

Repreenting Rotation Rotation matrix Euler angle Axi angle Quaternion Exponential map 4 Joint and rotation Rotational DOF are widely ued in character animation tranlational DOF 48 rotational DOF Each joint can have up to DOF DOF: knee DOF: writ DOF: arm 44

Euler Angle Repreentation Angle ued to rotate about cardinal axe Orientation are pecified by a et of ordered parameter that repreent ordered rotation about axe, ie. firt about x, then y, then z Many poible ordering, don t have to ue all axe, but can t do the ame axi back to back 45 Euler Angle A general rotation i a combination of three elementary rotation: around the x-axi (x-roll), around the y-axi (y-pitch) and around the z-axi (zyaw). 46

4 47 Euler Angle and Rotation Matrice co in in co ) ( co in in co ) pitch( y - co in in co ) ( yaw z roll x ),, ( c c c c c c c c c c c c c c R 48 Gimbal Lock A 9 degree rotation about the y axi eentially make the firt axi of rotation align with the third. Incremental change in x,z produce the ame reult you ve lot a degree of freedom

Gimbal Lock Phenomenon of two rotational axi of an object pointing in the ame direction. Reult: Loe a degree of freedom (DOF) 49 Gimbal Lock A Gimbal i a hardware implementation of Euler angle ued for mounting gyrocope or expenive globe Gimbal lock i a baic problem with repreenting D rotation uing Euler angle or fixed angle 5 5

Euler angle interpolation y π x z x-roll π y x z R(,,),,R(t,,),,R(,,) t[,] y π x z y-pitch π y π x z z-yaw π y x z R(,,),,R(,t, t),,r(,, ) 5 Euler Angle Interpolation Unnatural movement! 5 6

Repreenting Rotation Rotation matrix Euler angle Axi angle Quaternion Exponential map 5 Axi angle Repreent orientation a a vector and a calar - vector i the axi to rotate about - calar i the angle to rotate by 54 7

Angle and Axi Any orientation can be repreented by a 4-tuple - angle, vector(x,y,z) where the angle i the amount to rotate by and the vector i the axi to rotate about Can interpolate the angle and axi eparately No gimbal lock problem! But, can t efficiently compoe rotation mut convert to matrice firt! 55 Repreenting Rotation Rotation matrix Euler angle Axi angle Quaternion Exponential map 56 8

Quaternion Extenion of imaginary number Require one real and three imaginary component i, j, k q=q +q i+q j+q k 57 Quaternion Extenion of imaginary number Require one real and three imaginary component i, j, k q = (w, x, y, z) = co + in x, y, z ] of axi 58 9

Quaternion interpolation Quaternion can expre rotation on unit phere moothly and efficiently. -angle rotation can be repreented by a unit circle -angle rotation can be repreented by a unit phere Interpolation mean moving on n-d phere Now imagine a 4-D phere for -angle rotation Quaternion interpolation Moving between two point on the 4D unit phere - a unit quaternion at each tep - another point on the 4D unit phere - move along the great circle between the two point on the 4D unit phere a an arc 6

Quaternion interpolation Spherical linear interpolation (SLERP) Proce: -Rotation matrix quaternion -Carry out lerp/operation with quaternion -Quaternion rotation matrix 6 Matrix form 6

Summary Quaternion point on a 4D unit hyperphere + better interpolation + almot unique - le intuitive 6 Quaternion Math Unit quaternion Multiplication 64

Quaternion Rotation If i a unit quaternion and then reult in rotating about by proof: ee Quaternion by Shoemaker 65 Chooe a repreentation Chooe the bet repreentation for the tak - input: - joint limit: - interpolation: - compoiting: - rendering: Euler angle Euler angle, quaternion (harder) quaternion or exponential map quaternion or orientation matrix orientation matrix ( quaternion can be repreented a matrix a well) 66