©College of Computer and Information Science, Northeastern UniversitySeptember 9, 20151 CS 4300 Computer Graphics Prof. Harriet Fell Fall 2011 Lecture.

Slides:



Advertisements
Similar presentations
Computer Graphics Lecture 4 Geometry & Transformations.
Advertisements

1 Computer Graphics Chapter 8 3D Transformations.
Geometric Transformations
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
2D Geometric Transformations
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.
©College of Computer and Information Science, Northeastern UniversityJune 26, CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lecture 11.
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 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.
Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 2: Review of Basic Math
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
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
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.
Matrices, Transformations and the 3D Pipeline Matthew Rusch Paul Keet.
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
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Transformations of Objects – 3D
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.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Affine Transformations.
Computer Graphics 3D Transformations. Translation.
1 Graphics CSCI 343, Fall 2015 Lecture 10 Coordinate Transformations.
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
Affine Geometry.
College of Computer and Information Science, Northeastern UniversityFebruary 3, CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2006.
Transformations of objects
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,
Computer Graphic 2 D Transformation.
CSCE 441 Computer Graphics: 2D Transformations
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Modeling Transformation
COMPUTER GRAPHICS AND LINEAR ALGEBRA AN INTRODUCTION.
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 UniversitySeptember 9, CS 4300 Computer Graphics Prof. Harriet Fell Fall 2011 Lecture 11 – September 29, 2011

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

©College of Computer and Information Science, Northeastern UniversitySeptember 9, 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 UniversitySeptember 9, Basic 2D Linear Transforms

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

©College of Computer and Information Science, Northeastern UniversitySeptember 9, Scaling by.5 y x y x

©College of Computer and Information Science, Northeastern UniversitySeptember 9, General Scaling y x y x

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

©College of Computer and Information Science, Northeastern UniversitySeptember 9, Rotation φ φ sin(φ) cos(φ) -sin(φ) cos(φ)

©College of Computer and Information Science, Northeastern UniversitySeptember 9, Rotation y x y x φ

©College of Computer and Information Science, Northeastern UniversitySeptember 9, Reflection in y-axis

©College of Computer and Information Science, Northeastern UniversitySeptember 9, Reflection in y-axis y x y x

©College of Computer and Information Science, Northeastern UniversitySeptember 9, Reflection in x-axis

©College of Computer and Information Science, Northeastern UniversitySeptember 9, Reflection in x-axis y x y x

©College of Computer and Information Science, Northeastern UniversitySeptember 9, Shear-x s

©College of Computer and Information Science, Northeastern UniversitySeptember 9, Shear x y x y x

©College of Computer and Information Science, Northeastern UniversitySeptember 9, Shear-y s

©College of Computer and Information Science, Northeastern UniversitySeptember 9, Shear y y x y x

©College of Computer and Information Science, Northeastern UniversitySeptember 9, 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 UniversitySeptember 9, 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 UniversitySeptember 9, Reflection About an Arbitrary Line ( through the origin ) y x y x

©College of Computer and Information Science, Northeastern UniversitySeptember 9, Reflection as a Composition y x

©College of Computer and Information Science, Northeastern UniversitySeptember 9, 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 UniversitySeptember 9, 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 UniversitySeptember 9, 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 UniversitySeptember 9, 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 UniversitySeptember 9, 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 UniversitySeptember 9, 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 UniversitySeptember 9, Translation as a Shear x x y z y

©College of Computer and Information Science, Northeastern UniversitySeptember 9, 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 UniversitySeptember 9, y x Rotation about an Arbitrary Point y x φ φ

©College of Computer and Information Science, Northeastern UniversitySeptember 9, 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 UniversitySeptember 9, 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 UniversitySeptember 9, D Transformations Remember: A 3D linear transformation can be represented by a 3x3 matrix.

©College of Computer and Information Science, Northeastern UniversitySeptember 9, D Affine Transformations

©College of Computer and Information Science, Northeastern UniversitySeptember 9, D Rotations