6/22/2015©Zachary Wartell 2D Transformations Revision 1.2 Copyright Zachary Wartell, University of North Carolina All Rights Reserved Textbook: Chapter.

Slides:



Advertisements
Similar presentations
3D Transformations Assist. Prof. Dr. Ahmet Sayar
Advertisements

COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Computer Graphics Lecture 4 Geometry & Transformations.
Geometric Transformations
1 Computer Graphics Chapter 6 2D Transformations.
Two-Dimensional Geometric Transformations
2D Geometric Transformations
6/10/2015©Zachary Wartell Points, Vectors, Alignments, Affine Coordinate Systems and Affine Transformations Textbook: Section 5.
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz
Linear Algebra and SVD (Some slides adapted from Octavia Camps)
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
6/16/2015©Zachary Wartell 2D Coordinate Systems, Change of Coordinates, and Matrices Revision: 1/8/2008 6:14:11 PM Copyright Zachary Wartell, University.
2D/3D Geometric Transformations CS485/685 Computer Vision Dr. George Bebis.
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
3D Coordinate Systems and Transformations Revision 1
©College of Computer and Information Science, Northeastern UniversityJune 26, CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lecture 11.
6/28/2015©Zachary Wartell Homogenous Coordinates and Projective Geometry (Crudely Speaking) Revision 1.2 Copyright Zachary Wartell, University of North.
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.
CS 450: Computer Graphics 2D TRANSFORMATIONS
Mathematical Fundamentals
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
5.2 Three-Dimensional Geometric and Modeling Transformations 2D3D Consideration for the z coordinate.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
Transformation of Graphics
Transformations Dr. Amy Zhang.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
Elementary Linear Algebra Anton & Rorres, 9th Edition
2D Transformation of Graphics
Lecture Notes: Computer Graphics.
Geometric Transformations Jehee Lee Seoul National University.
2003CS Hons RW778 Graphics1 Chapter 5: Transforming Objects 5.2 Introduction to Transformations 5.2 Introduction to Transformations –Affine transformations.
Part7: Geometric Transformations
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
1 MAC 2103 Module 6 Euclidean Vector Spaces I. 2 Rev.F09 Learning Objectives Upon completing this module, you should be able to: 1. Use vector notation.
Transformations Jehee Lee Seoul National University.
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
Computer Graphics 2D Transformations. 2 of 74 Contents In today’s lecture we’ll cover the following: –Why transformations –Transformations Translation.
Transformation.
CSE Real Time Rendering Week 5. Slides(Some) Courtesy – E. Angel and D. Shreiner.
Two-Dimensional Geometric Transformations ch5. 참조 Subjects : Basic Transformations Homogeneous Coordinates Composite Transformations Other Transformations.
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
GEOMETRIC TRANFORMATIONS Presented By -Lakshmi Sahithi.
Geometric Transformations Sang Il Park Sejong University Many slides come from Jehee Lee’s.
Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk
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.
Learning Objectives Affine transformations Affine transformations Translation Translation Rotation Rotation Scaling Scaling Reflection Reflection Shear.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics I, Fall 2010 Transformations.
1 Teaching Innovation - Entrepreneurial - Global The Centre for Technology enabled Teaching & Learning, N Y S S, India DTEL DTEL (Department for Technology.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
Computer Graphics Lecture 11 2D Transformations I Taqdees A. Siddiqi
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Computer Graphic 2 D Transformation.
Image Warping 2D Geometric Transformations
CSCE 441 Computer Graphics: 2D Transformations
Modeling Transformation
Transformations. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
3. Transformation
Geometric Transformations Hearn & Baker Chapter 5
2D Transformations with Matrices
Computer Graphics Lecture 18 3-D Transformations-II Taqdees A
Computer Graphics Transformations
Geometric Camera Models
TWO DIMENSIONAL TRANSFORMATION
Presentation transcript:

6/22/2015©Zachary Wartell 2D Transformations Revision 1.2 Copyright Zachary Wartell, University of North Carolina All Rights Reserved Textbook: Chapter 5

6/22/2015©Zachary Wartell Matrices: Change of Coordinates vs Geometric Transform A [Mi]A[Mi]A ●Matrices can represent a change of coordinates denoted: M A ← B ● Matrices are also useful for representing transformations of geometry denoted: [M i ] A, [ M j ] A, [ M k ] A [Mj]A[Mj]A

6/22/2015©Zachary Wartell Recall: Discrete Math 101: Relation, Function, One-to-one, etc. Relation (Binary) Domain D Range R relation L (on|in) set D (onto|into) set R, L = {(d,r) | d  D and r  R} onto in on into

6/22/2015©Zachary Wartell Recall: Converse Relation Domain D Range R relation L in set D into set R Domain D' (=R) Range R' (=D) CONVERSE( L ) in set D' into set R' (r,d)  CONVERSE( L ) iff (d,r)  L

6/22/2015©Zachary Wartell Recall: Function function – binary relation where every element d element in the domain D in related to at most one element r in the domain R Domain D Range R Not a Function! Domain D Range R A Function!

6/22/2015©Zachary Wartell Recall: Function One-to-one one-to-one function – a function every element r element in the range R in related to at most one element d in the domain D Not one-to-one! Domain D Range R A one-to-one Function! Domain D Range R

6/22/2015©Zachary Wartell Recall: Inverse of Function a 1-to-1 function F has a 'inverse' function F -1. –Take F. build CONVERSE(F). Since F is 1-to-1, CONVERSE(F) is also function. CONVERSE(F) is a function syn. the ‘inverse exists’, F -1 exists, F is ‘invertible’, F is 'non-singular' Domain D Range R A one-to-one Function! D' R'

6/22/2015©Zachary Wartell 2D Transform 2D function that maps points ( x, y ) to points ( x', y' ) Example: F: ( x, y )  ( x, y+x 2 )

6/22/2015©Zachary Wartell Affine Transformations translate (T) – preserve area, length, angles, orientation rotate (R) – preserve area, length, angles scale (S) – preserve perpendicularity of axis rigid-body/congruency – (T · R) preserve area, length, angles uniform scale/”similarity” – preserve angles, orientation All affine transformations: ●preserve lines ●preserve parallelism ● preserve distance ratio (→equal spacing) ●'map points to points & vectors to vectors' Start:

6/22/2015©Zachary Wartell ' Preserve Lines l l'l' M transforming entire grid l: p = p 0 + t ( p 1 - p 0 ) → l': M(p) =M( p 0 ) + t (M( p 1 )-M( p 0 )) p0p0 p1p1 p p0p0 p p1p1 ' '

6/22/2015©Zachary Wartell Parallelism lala lblb la'la' lb'lb' M transforming entire grid l a || l b → M(l a ) || M(l b ) = l' a || l' b

6/22/2015©Zachary Wartell Distance Ratios l l'l' M transforming entire grid ab/bc = a'b'/b'c' a b c a'a' b'b' c'

6/22/2015©Zachary Wartell Translation add offset vector, t, to every point t ( x,y )  ( x+t x,y+t y ) matrix form:

6/22/2015©Zachary Wartell Rotate specify pivot point and angle how to rotate ( x,y ) about P through θ ? –algebra: assume P is origin P θ Observe: sin (Φ + θ) = y'/rcos (Φ + θ) = x'/r sin Φ = y/rcos Φ = x/r x-axis (x,y) (x’,y’) Φ θ r (0,0) y-axis Use double angle formulas: cos (Φ + θ) = cos Φ cosθ - sin Φ sinθ sin (Φ + θ) = sin Φ cosθ + cos Φ sinθ Substitute: x'/r = (x/r)cos θ - (y/r)sin θ Therefore: x' = x cos θ - y sin θ Similarly: y' = x sin θ + ycos θ

6/22/2015©Zachary Wartell Rotate about Origin matrix form:

6/22/2015©Zachary Wartell uniform scale specified by scale factor s and fixed point p algebra: assume scale about origin x'=s x, y' =s y i.e. Scaling: Uniform 1 s p

6/22/2015©Zachary Wartell specify two scale factors sx and sy, and two perpendicular fixed lines algebra: assume scale along x and y axis Scale: Differential sx p sy B

6/22/2015©Zachary Wartell Inverse Transforms translate rotate scale

6/22/2015©Zachary Wartell Shear (along X/Y axis) Y Shear (in terms of X) X Shear (in terms of Y)

6/22/2015©Zachary Wartell Reflections X Axis ReflectionY Axis Reflection Origin ReflectionReflection on y=x

6/22/2015©Zachary Wartell Composing Transformations Examples:

6/22/2015©Zachary Wartell Matrix Composition: Non-Communitive! Matrix multiplication non-communitive Example

6/22/2015©Zachary Wartell How do I rotate about arbitrary point p? B [M Rot(θ) ] B (3,3) B v A M Rot (θ,p) p (?,?) B v' (3,3) B v [M Rot(θ) ] A =[M Rot(θ,p) ] B p

6/22/2015©Zachary Wartell If I know v in B, (3,3) B, and M Rot(θ) in A, then how do I compute v' in in B ? Note, matrices used as both:  a geometric transformation [M ? ] A ) and  a change of coordinates (M B ← A & M A ← B )

6/22/2015©Zachary Wartell If I know v in B, (3,3) B, and M Rot(θ) in A, then how to I compute v' in in B ?

6/22/2015©Zachary Wartell Generally: If I know v in B, and M ? in A, then compute v' in in B … Note, matrices used as both:  a geometric transformation [M ? ] A ) and  a change of coordinates (M B ← A & M A ← B )

6/22/2015©Zachary Wartell Two ways to visualize____________________ Measurement visualization: –measure coordinates in A –perform [M ? ] A –measure coordinates in B Superimpose visualization: 1) 2) 3) 4)

6/22/2015©Zachary Wartell Scale about arbitrary point sx p sy BA

6/22/2015©Zachary Wartell Differential Scale about arbitrary lines

6/22/2015©Zachary Wartell In Progress… Switch to /current/Lectures/Wartell/web%20page/ITCS% D%20Transforms.ppthttp:// 5120/current/Lectures/Wartell/web%20page/ITCS% D%20Transforms.ppt

6/22/2015©Zachary Wartell Weird Cases: Singular Matrices C M i A maps all 2D space to this line M j A (C) – all 2D space maps to this point A M i A (C)

6/22/2015©Zachary Wartell Revisions Work in progress, completely replacing and revamping Dr. Hodges older slides