©College of Computer and Information Science, Northeastern UniversityJune 26, 20151 CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lecture 11.

Slides:



Advertisements
Similar presentations
Transformations Ed Angel Professor Emeritus of Computer Science
Advertisements

COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Computer Graphics Lecture 4 Geometry & Transformations.
Geometric Transformations
Arbitrary Rotations in 3D Lecture 18 Wed, Oct 8, 2003.
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz
CS 4731: Computer Graphics Lecture 7: Introduction to Transforms, 2D transforms Emmanuel Agu.
CS 376 Introduction to Computer Graphics 02 / 09 / 2007 Instructor: Michael Eckmann.
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
Chapter 4 Linear Transformations. Outlines Definition and Examples Matrix Representation of linear transformation Similarity.
Transformations I CS5600Computer Graphics by Rich Riesenfeld 27 February 2002 Lecture Set 5.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
2D Transformations x y x y x y. 2D Transformation Given a 2D object, transformation is to change the object’s Position (translation) Size (scaling) Orientation.
2D Transformations Unit - 3. Why Transformations? In graphics, once we have an object described, transformations are used to move that object, scale it.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology 3D Engines and Scene Graphs Spring 2012.
CS 450: Computer Graphics 2D TRANSFORMATIONS
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
©College of Computer and Information Science, Northeastern UniversitySeptember 9, CS 4300 Computer Graphics Prof. Harriet Fell Fall 2011 Lecture.
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
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.
Graphics Graphics Korea University cgvr.korea.ac.kr 2D Geometric Transformations 고려대학교 컴퓨터 그래픽스 연구실.
Lecture Notes: Computer Graphics.
2003CS Hons RW778 Graphics1 Chapter 5: Transforming Objects 5.2 Introduction to Transformations 5.2 Introduction to Transformations –Affine transformations.
Dx = 2 dy = 3 Y X D Translation A translation is applied to an object by repositioning it along a straight-line path.
2D Geometric Transformations
Part7: Geometric Transformations
Chi-Cheng Lin, Winona State University CS430 Computer Graphics Transformations of Objects – 2D Part I.
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
©College of Computer and Information Science, Northeastern University CS 4300 Computer Graphics Prof. Harriet Fell Fall 2012 Lecture 12 – October 1, 2012.
Computer Graphics, KKU. Lecture 51 Transformations Given two frames in an affine space of dimension n, we can find a ( n+1 ) x ( n +1) matrix that.
Transformations Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Transformations of Objects – 3D
Transformational Geometry CS418 Computer Graphics John C. Hart.
Dr. Engr. Sami ur Rahman Digital Image Processing Lecture 9: Rotation, Scaling, Shear, Affine Transformation.
CS 325 Introduction to Computer Graphics 02 / 26 / 2010 Instructor: Michael Eckmann.
Computer Graphics 3D Transformations. Translation.
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
January 19, y X Z Translations Objects are usually defined relative to their own coordinate system. We can translate points in space to new positions.
Affine Geometry.
College of Computer and Information Science, Northeastern UniversityFebruary 3, CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2006.
II-1 Transformations Transformations are needed to: –Position objects defined relative to the origin –Build scenes based on hierarchies –Project objects.
III- 1 III 3D Transformation Homogeneous Coordinates The three dimensional point (x, y, z) is represented by the homogeneous coordinate (x, y, z, 1) In.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics I, Fall 2010 Transformations.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
Computer Graphics Lecture 16 Fasih ur Rehman. Last Class Homogeneous transformations Types of Transformations – Linear Transformations – Affine 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,
CSCE 441 Computer Graphics: 2D Transformations
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Modeling Transformation
Transformations. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
Transformations University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016 Tamara Munzner.
Computer Graphics Lecture 15 Fasih ur Rehman. Last Class Combining Transformations Affine versus Rigid body Transformations Homogenous Transformations.
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
Transforms.
CS G140 Graduate Computer Graphics
Introduction to Computer Graphics CS 445 / 645
Computer Graphics Transformations
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
Geometrical Transformations
Transformations.
CS G140 Graduate Computer Graphics
Transformations 2 University of British Columbia
Translation in Homogeneous Coordinates
Presentation transcript:

©College of Computer and Information Science, Northeastern UniversityJune 26, CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lecture 11 – January 28, 2009

©College of Computer and Information Science, Northeastern UniversityJune 26, Today’s Topics Linear Algebra Review  Matrices  Transformations New Linear Algebra  Homogeneous Coordinates

©College of Computer and Information Science, Northeastern UniversityJune 26, Matrices We use 2x2, 3x3, and 4x4 matrices in computer graphics. We’ll start with a review of 2D matrices and transformations.

©College of Computer and Information Science, Northeastern UniversityJune 26, Basic 2D Linear Transforms

©College of Computer and Information Science, Northeastern UniversityJune 26, Scale by.5 (1, 0) (0.5, 0) (0, 1) (0, 0.5)

©College of Computer and Information Science, Northeastern UniversityJune 26, Scaling by.5 y x y x

©College of Computer and Information Science, Northeastern UniversityJune 26, General Scaling y x y x

©College of Computer and Information Science, Northeastern UniversityJune 26, General Scaling sxsx 1 1 sysy y x y x

©College of Computer and Information Science, Northeastern UniversityJune 26, Rotation   sin(  ) cos(  ) -sin(  ) cos(  )

©College of Computer and Information Science, Northeastern UniversityJune 26, Rotation y x y x 

©College of Computer and Information Science, Northeastern UniversityJune 26, Reflection in y-axis

©College of Computer and Information Science, Northeastern UniversityJune 26, Reflection in y-axis y x y x

©College of Computer and Information Science, Northeastern UniversityJune 26, Reflection in x-axis

©College of Computer and Information Science, Northeastern UniversityJune 26, Reflection in x-axis y x y x

©College of Computer and Information Science, Northeastern UniversityJune 26, Shear-x s

©College of Computer and Information Science, Northeastern UniversityJune 26, Shear x y x y x

©College of Computer and Information Science, Northeastern UniversityJune 26, Shear-y s

©College of Computer and Information Science, Northeastern UniversityJune 26, Shear y y x y x

©College of Computer and Information Science, Northeastern UniversityJune 26, Linear Transformations Scale, Reflection, Rotation, and Shear are all linear transformations They satisfy: T( a u + b v) = a T(u) + b T(v)  u and v are vectors  a and b are scalars If T is a linear transformation  T((0, 0)) = (0, 0)

©College of Computer and Information Science, Northeastern UniversityJune 26, Composing Linear Transformations If T 1 and T 2 are transformations  T 2 T 1 (v) = def T 2 ( T 1 (v)) If T 1 and T 2 are linear and are represented by matrices M 1 and M 2  T 2 T 1 is represented by M 2 M 1  T 2 T 1 (v) = T 2 ( T 1 (v)) = (M 2 M 1 )(v)

©College of Computer and Information Science, Northeastern UniversityJune 26, Reflection About an Arbitrary Line ( through the origin ) y x y x

©College of Computer and Information Science, Northeastern UniversityJune 26, Reflection as a Composition y x

©College of Computer and Information Science, Northeastern UniversityJune 26, Decomposing Linear Transformations Any 2D Linear Transformation can be decomposed into the product of a rotation, a scale, and a rotation if the scale can have negative numbers. M = R 1 SR 2

©College of Computer and Information Science, Northeastern UniversityJune 26, Rotation about an Arbitrary Point y x  y x  This is not a linear transformation. The origin moves.

©College of Computer and Information Science, Northeastern UniversityJune 26, Translation y x y x (a, b) This is not a linear transformation. The origin moves. (x, y)  (x+a,y+b)

©College of Computer and Information Science, Northeastern UniversityJune 26, Homogeneous Coordinates x x y z y Embed the xy-plane in R 3 at z = 1. (x, y)  (x, y, 1)

©College of Computer and Information Science, Northeastern UniversityJune 26, D Linear Transformations as 3D Matrices Any 2D linear transformation can be represented by a 2x2 matrix or a 3x3 matrix

©College of Computer and Information Science, Northeastern UniversityJune 26, D Linear Translations as 3D Matrices Any 2D translation can be represented by a 3x3 matrix. This is a 3D shear that acts as a translation on the plane z = 1.

©College of Computer and Information Science, Northeastern UniversityJune 26, Translation as a Shear x x y z y

©College of Computer and Information Science, Northeastern UniversityJune 26, D Affine Transformations An affine transformation is any transformation that preserves co-linearity (i.e., all points lying on a line initially still lie on a line after transformation) and ratios of distances (e.g., the midpoint of a line segment remains the midpoint after transformation). With homogeneous coordinates, we can represent all 2D affine transformations as 3D linear transformations. We can then use matrix multiplication to transform objects.

©College of Computer and Information Science, Northeastern UniversityJune 26, y x Rotation about an Arbitrary Point y x  

©College of Computer and Information Science, Northeastern UniversityJune 26,  y x Rotation about an Arbitrary Point   T(-c x, -c y ) R(  ) T(c x, c y )

©College of Computer and Information Science, Northeastern UniversityJune 26, Windowing Transforms (a,b) (A,B) (c,d) (C,D) (C-c,D-d) (A-a,B-b) translate scale translate

©College of Computer and Information Science, Northeastern UniversityJune 26, D Transformations Remember: A 3D linear transformation can be represented by a 3x3 matrix.

©College of Computer and Information Science, Northeastern UniversityJune 26, D Affine Transformations

©College of Computer and Information Science, Northeastern UniversityJune 26, D Rotations