Transformations University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016 Tamara Munzner.

Slides:



Advertisements
Similar presentations
CS 691 Computational Photography Instructor: Gianfranco Doretto Image Warping.
Advertisements

COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Geometric Transformations
1 Computer Graphics Chapter 6 2D Transformations.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Transformations III Week.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Transformations I Week.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Transformations Week 2,
Transformations II Week 2, Wed Jan 17
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Transformations II Week.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz
Graphics-1 Gentle Introduction to Computer Graphics (2) Based on: –David Brogan’s “Introduction to Computer Graphics” Course Slides, University of Virginia.
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2008 Some slides from Steve Seitz
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2005 Some slides from Steve Seitz
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner OpenGL, GLUT, Transformations.
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.
Introduction to Computer Graphics CS 445 / 645 Lecture 5 Transformations Transformations M.C. Escher – Smaller and Smaller (1956)
Geometric Transformation-2D
2D Transformations Unit - 3. Why Transformations? In graphics, once we have an object described, transformations are used to move that object, scale it.
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/27/11 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology 3D Engines and Scene Graphs Spring 2012.
Image Warping (Szeliski 3.6.1) cs129: Computational Photography James Hays, Brown, Fall 2012 Slides from Alexei Efros and Steve Seitz
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
Multimedia Programming 06: Image Warping Departments of Digital Contents Sang Il Park.
Warping CSE 590 Computational Photography Tamara Berg.
Graphics Graphics Korea University cgvr.korea.ac.kr 2D Geometric Transformations 고려대학교 컴퓨터 그래픽스 연구실.
Lecture Notes: Computer Graphics.
ICS201 Lecture 12 : Gentle Introduction to Computer Graphics II King Fahd University of Petroleum & Minerals College of Computer Science & Engineering.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munzner GLUT, Transformations.
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
Image Warping Computational Photography Derek Hoiem, University of Illinois 09/23/10 Many slides from Alyosha Efros + Steve Seitz Photo by Sean Carroll.
Computer Graphics 3D Transformations. Translation.
Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.
Geometric Transformations
Multimedia Programming 07: Image Warping Keyframe Animation Departments of Digital Contents Sang Il Park.
Recap from Monday DCT and JPEG Point Processing Histogram Normalization Questions: JPEG compression levels Gamma correction.
Image Warping Many slides from Alyosha Efros + Steve Seitz + Derek oeim Photo by Sean Carroll.
4. Affine transformations. Reading Required:  Watt, Section 1.1. Further reading:  Foley, et al, Chapter  David F. Rogers and J. Alan Adams,
Computer Graphic 2 D Transformation.
Image Warping 2D Geometric Transformations
Modeling Transformation
Transformations. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
Computer Graphics Lecture 15 Fasih ur Rehman. Last Class Combining Transformations Affine versus Rigid body Transformations Homogenous Transformations.
Final Review I University of British Columbia
Transforms.
Computer Graphics CC416 Week 15 3D Graphics.
Computer Graphics Transformations.
Review: Transformations
Computer Graphics 3D Transformations
Computational Photography Derek Hoiem, University of Illinois
Computer Graphics Transformations.
Introduction to Computer Graphics CS 445 / 645
Review: Transformations
2D Transformations y y x x y x.
Image Warping (Szeliski Sec 2.1.2)
Image Warping (Szeliski Sec 2.1.2)
Computer Graphics Transformations
Image Warping : Computational Photography
Recap from Friday Image Completion Synthesis Order Graph Cut Scene Completion.
Transformations 3 University of British Columbia
Image Warping : Computational Photography
2D Geometric Transformations
Image Warping (Szeliski Sec 2.1.2)
Image manipulation via matrices
Rendering – Matrix Transformations and the Graphics Pipeline
OpenGL, GLUT, Transformations I Week 2, Wed Jan 16
Transformations 2 University of British Columbia
TWO DIMENSIONAL TRANSFORMATION
Computational Photography Derek Hoiem, University of Illinois
Presentation transcript:

Transformations University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016 Tamara Munzner

2 Readings for Transformations 1-5 Shirley/Marschner Ch 6: Transformation Matrices except 6.1.6, Sect 12.2 Scene Graphs Gortler Ch 2: Linear, Sec Ch 3: Affine Ch 4: Respect Ch 5: Frames in Graphics,

3 2D Transformations

4 Transformations transforming an object = transforming all its points transforming a polygon = transforming its vertices

5 Matrix Representation represent 2D transformation with matrix multiply matrix by column vector apply transformation to point transformations combined by multiplication matrices are efficient, convenient way to represent sequence of transformations!

6 Scaling scaling a coordinate means multiplying each of its components by a scalar uniform scaling means this scalar is the same for all components:  2 2

7 non-uniform scaling: different scalars per component: how can we represent this in matrix form? Scaling X  2, Y  0.5

8 Scaling scaling operation: or, in matrix form: scaling matrix

9 2D Rotation  (x, y) (x', y') x ' = x cos(  ) - y sin(  ) y ' = x sin(  ) + y cos(  ) counterclockwise RHS

10 2D Rotation From Trig Identities x = r cos (  ) y = r sin (  ) x' = r cos (  +  ) y' = r sin (  +  ) Trig Identity… x' = r cos(  ) cos(  ) – r sin(  ) sin(  ) y' = r sin(  ) cos(  ) + r cos(  ) sin(  ) Substitute… x' = x cos(  ) - y sin(  ) y' = x sin(  ) + y cos(  )  (x, y) (x', y') 

11 2D Rotation: Another Derivation (x ',y ' )  (x,y)

12 2D Rotation: Another Derivation (x ',y ' ) (x,y)  x y

13 2D Rotation: Another Derivation (x ',y ' ) (x,y)  x y  x y

14 2D Rotation: Another Derivation x ' B A (x ',y ' ) (x,y)

15 2D Rotation: Another Derivation x x ' B A (x ',y ' ) (x,y)  x

16 2D Rotation: Another Derivation x B A y y   (x ',y ' ) (x,y)  x ' 

17 2D Rotation Matrix easy to capture in matrix form: even though sin(q) and cos(q) are nonlinear functions of q, x ' is a linear combination of x and y y ' is a linear combination of x and y

18 Shear shear along x axis push points to right in proportion to height x y x y

19 Shear shear along x axis push points to right in proportion to height x y x y

20 Reflection x x reflect across x axis mirror

21 Reflection reflect across x axis mirror x x

22 2D Translation (x,y) (x’,y’)

23 2D Translation (x,y) (x’,y’) scaling matrixrotation matrix

24 2D Translation (x,y) (x’,y’) scaling matrixrotation matrix vector addition matrix multiplication

25 2D Translation (x,y) (x’,y’) scaling matrixrotation matrix translation multiplication matrix?? vector addition matrix multiplication

26 Linear Transformations linear transformations are combinations of shear scale rotate reflect properties of linear transformations satisifes T(sx+ty) = s T(x) + t T(y) origin maps to origin lines map to lines parallel lines remain parallel ratios are preserved closed under composition

27 Challenge matrix multiplication for everything except translation can we just do everything with multiplication? then could just do composition, no special cases