Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

Lecture 3: Transformations and Viewing. General Idea Object in model coordinates Transform into world coordinates Represent points on object as vectors.
1Computer Graphics Homogeneous Coordinates & Transformations Lecture 11/12 John Shearer Culture Lab – space 2
Transformations Ed Angel Professor Emeritus of Computer Science
CS 691 Computational Photography Instructor: Gianfranco Doretto Image Warping.
Computer Graphics Lecture 4 Geometry & Transformations.
1 ME 302 DYNAMICS OF MACHINERY Dynamic Force Analysis IV Dr. Sadettin KAPUCU © 2007 Sadettin Kapucu.
Transformations II Week 2, Wed Jan 17
2D Geometric Transformations
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
Outline for Today More math… Finish linear algebra: Matrix composition
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
3-D Geometry.
Computer Graphics (Fall 2008) COMS 4160, Lecture 3: Transformations 1
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Computer Graphics (Fall 2008) COMS 4160, Lecture 4: Transformations 2
Computer Graphics (Fall 2004) COMS 4160, Lecture 3: Transformations 1
Computer Graphics (Fall 2005) COMS 4160, Lecture 2: Review of Basic Math
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.
CS 450: Computer Graphics 2D 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.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 2: Review of Basic Math
1 Matrix Math ©Anthony Steed Overview n To revise Vectors Matrices n New stuff Homogenous co-ordinates 3D transformations as matrices.
Mathematical Fundamentals
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
Patrick Nichols Thursday, September 18, Linear Algebra Review.
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 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
Spatial Descriptions and Transformations Sebastian van Delden USC Upstate
6.837 Linear Algebra Review Rob Jagnow Monday, September 20, 2004.
Transformations Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 4: Transformations 2
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
CS559: Computer Graphics Lecture 8: 3D Transforms Li Zhang Spring 2008 Most Slides from Stephen Chenney.
Transformation.
CS559: Computer Graphics Lecture 8: Warping, Morphing, 3D Transformation Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Geometric Transformations
Transformations CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Geometric Transformations Sang Il Park Sejong University Many slides come from Jehee Lee’s.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
Fall 2004CS-321 Dr. Mark L. Hornick 1 2-D Transformations World Coordinates Local/Modelling Coordinates x y Object descriptions Often defined in model.
Lecture 5: Introduction to 3D
Affine Geometry.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 3: Transformations 1
Graphics Lecture 2: Slide 1 Lecture 2 Transformations for animation.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
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.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
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,
CSE 167 [Win 17], Lecture 2: Review of Basic Math Ravi Ramamoorthi
CSE 167 [Win 17], Lecture 3: Transformations 1 Ravi Ramamoorthi
Review: Transformations
Review: Transformations
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
Transformations 3 University of British Columbia
CSCE441: Computer Graphics 2D/3D Transformations
Lecture 8: 3D Transforms Li Zhang Spring 2008
Presentation transcript:

Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 3: Transformations 1

To Do  Submit HW 0b  Start looking at HW 1 (simple, but need to think)  Axis-angle rotation and gluLookAt most useful  Probably only need final results, but try understanding derivations.  Problems in text help understanding material. Usually, we have review sessions per unit, but this one before midterm

Course Outline  3D Graphics Pipeline Modeling AnimationRendering

Course Outline  3D Graphics Pipeline Unit 1: Transformations Resizing and placing objects in the world. Creating perspective images. Weeks 1 and 2 Ass 1 due Sep 12 (DEMO) Modeling AnimationRendering

Motivation  Many different coordinate systems in graphics  World, model, body, arms, …  To relate them, we must transform between them  Also, for modeling objects. I have a teapot, but  Want to place it at correct location in the world  Want to view it from different angles (HW 1)  Want to scale it to make it bigger or smaller  Demo of HW 1

Goals  This unit is about the math for these transformations  Represent transformations using matrices and matrix- vector multiplications.  Demos throughout lecture: HW 1 and Applet  Transformations Game Applet  Brown University Exploratories of Software   Credit: Andries Van Dam and Jean Laleuf

General Idea  Object in model coordinates  Transform into world coordinates  Represent points on object as vectors  Multiply by matrices  Demos with applet

Outline  2D transformations: rotation, scale, shear  Composing transforms  3D rotations  Translation: Homogeneous Coordinates (next time)  Transforming Normals (next time)

(Nonuniform) Scale transformation_game.jar

Shear

Rotations 2D simple, 3D complicated. [Derivation? Examples?] 2D?  Linear  Commutative R(X+Y)=R(X)+R(Y) transformation_game.jar

Outline  2D transformations: rotation, scale, shear  Composing transforms  3D rotations  Translation: Homogeneous Coordinates  Transforming Normals

Composing Transforms  Often want to combine transforms  E.g. first scale by 2, then rotate by 45 degrees  Advantage of matrix formulation: All still a matrix  Not commutative!! Order matters

E.g. Composing rotations, scales transformation_game.jar

Inverting Composite Transforms  Say I want to invert a combination of 3 transforms  Option 1: Find composite matrix, invert  Option 2: Invert each transform and swap order  Obvious from properties of matrices transformation_game.jar

Outline  2D transformations: rotation, scale, shear  Composing transforms  3D rotations  Translation: Homogeneous Coordinates  Transforming Normals

Rotations Review of 2D case  Orthogonal?,

Rotations in 3D  Rotations about coordinate axes simple  Always linear, orthogonal  Rows/cols orthonormal R(X+Y)=R(X)+R(Y)

Geometric Interpretation 3D Rotations  Rows of matrix are 3 unit vectors of new coord frame  Can construct rotation matrix from 3 orthonormal vectors

Geometric Interpretation 3D Rotations  Rows of matrix are 3 unit vectors of new coord frame  Can construct rotation matrix from 3 orthonormal vectors  Effectively, projections of point into new coord frame  New coord frame uvw taken to cartesian components xyz  Inverse or transpose takes xyz cartesian to uvw

Non-Commutativity  Not Commutative (unlike in 2D)!!  Rotate by x, then y is not same as y then x  Order of applying rotations does matter  Follows from matrix multiplication not commutative  R1 * R2 is not the same as R2 * R1  Demo: HW1, order of right or up will matter

Arbitrary rotation formula  Rotate by an angle θ about arbitrary axis a  Homework 1: must rotate eye, up direction  Somewhat mathematical derivation but useful formula  Problem setup: Rotate vector b by θ about a  Helpful to relate b to X, a to Z, verify does right thing  For HW1, you probably just need final formula

Axis-Angle formula  Step 1: b has components parallel to a, perpendicular  Parallel component unchanged (rotating about an axis leaves that axis unchanged after rotation, e.g. rot about z)  Step 2: Define c orthogonal to both a and b  Analogous to defining Y axis  Use cross products and matrix formula for that  Step 3: With respect to the perpendicular comp of b  Cos θ of it remains unchanged  Sin θ of it projects onto vector c  Verify this is correct for rotating X about Z  Verify this is correct for θ as 0, 90 degrees

Axis-Angle: Putting it together Unchanged (cosine) Component along a (hence unchanged) Perpendicular (rotated comp)

Axis-Angle: Putting it together (x y z) are cartesian components of a