2D Geometric Transformations. (Chapter 5 in FVD)

Similar documents
Graphics Example: Type Setting

Operations depend on pixel s Coordinates. Context free. Independent of pixel values. I(x,y) I (x,y )

CS 378: Computer Game Technology

CS 354R: Computer Game Technology

Reading. 4. Affine transformations. Required: Watt, Section 1.1. Further reading:

Affine transformations

Vector and Affine Math

we must pay attention to the role of the coordinate system w.r.t. which we perform a tform

Two conventions for coordinate systems. Left-Hand vs Right-Hand. x z. Which is which?

Affine transformations. Brian Curless CSE 557 Fall 2014

we must pay attention to the role of the coordinate system w.r.t. which we perform a tform

Affine transformations

CS 335 Graphics and Multimedia. 2D Graphics Primitives and Transformation

Computer Graphics: 2D Transformations. Course Website:

Transformations. Chapter D Transformations Translation

Geometric Image Manipulation. Lecture #4 Wednesday, January 24, 2018

( ) ( ) ( ) ( ) TNM046: Datorgrafik. Transformations. Linear Algebra. Linear Algebra. Sasan Gooran VT Transposition. Scalar (dot) product:

CS 4300 Computer Graphics. Prof. Harriet Fell Fall 2011 Lecture 11 September 29, 2011

Linear and affine transformations

MATRIX TRANSFORMATIONS

Rigid Body Transforms-3D. J.C. Dill transforms3d 27Jan99

Matrices. VCE Maths Methods - Unit 2 - Matrices

Phys 221. Chapter 3. Vectors A. Dzyubenko Brooks/Cole

Introduction to 3D Game Programming with DirectX 9.0c: A Shader Approach

Affine transformations

1 HOMOGENEOUS TRANSFORMATIONS

Mathematical Structures for Computer Graphics Steven J. Janke John Wiley & Sons, 2015 ISBN: Exercise Answers

Lecture 5: 3-D Rotation Matrices.

Physically Based Rendering ( ) Geometry and Transformations

Omm Al-Qura University Dr. Abdulsalam Ai LECTURE OUTLINE CHAPTER 3. Vectors in Physics

CSC 470 Introduction to Computer Graphics. Mathematical Foundations Part 2

The first change comes in how we associate operators with classical observables. In one dimension, we had. p p ˆ

Homogeneous Transformations

COMP 175 COMPUTER GRAPHICS. Lecture 04: Transform 1. COMP 175: Computer Graphics February 9, Erik Anderson 04 Transform 1

Coordinates for Projective Planes

Designing Information Devices and Systems I Discussion 2A

CS-184: Computer Graphics. Today

Reading. Affine transformations. Vector representation. Geometric transformations. x y z. x y. Required: Angel 4.1, Further reading:

Solutions of homework 1. 2 a) Using the stereographic projection from the north pole N = (0, 0, 1) introduce stereographic coordinates

Some linear transformations on R 2 Math 130 Linear Algebra D Joyce, Fall 2013

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2

03 - Basic Linear Algebra and 2D Transformations

9. Yes; translate so that the centers align, and then dilate using the ratio of radii to map one circle to another.

5. Nonholonomic constraint Mechanics of Manipulation

CSE4030 Introduction to Computer Graphics

Consider a slender rod, fixed at one end and stretched, as illustrated in Fig ; the original position of the rod is shown dotted.

And similarly in the other directions, so the overall result is expressed compactly as,

SET-I SECTION A SECTION B. General Instructions. Time : 3 hours Max. Marks : 100

Linear Algebra & Geometry why is linear algebra useful in computer vision?

Vectors for Physics. AP Physics C

A geometric interpretation of the homogeneous coordinates is given in the following Figure.

Mathematics 309 Conic sections and their applicationsn. Chapter 2. Quadric figures. ai,j x i x j + b i x i + c =0. 1. Coordinate changes

Section 1.8/1.9. Linear Transformations

Geometry review, part I

Lecture 4: Affine Transformations. for Satan himself is transformed into an angel of light. 2 Corinthians 11:14

(A B) 2 + (A B) 2. and factor the result.

Unit 12 Study Notes 1 Systems of Equations

CS 112 Transformations II. Aditi Majumder, CS 112 Slide 1

Three-Dimensional Coordinate Systems. Three-Dimensional Coordinate Systems. Three-Dimensional Coordinate Systems. Three-Dimensional Coordinate Systems

Chapter 3. Vectors and Two-Dimensional Motion

Mathematical Foundations: Intro

APPLIED MECHANICS I Resultant of Concurrent Forces Consider a body acted upon by co-planar forces as shown in Fig 1.1(a).

Lines and points. Lines and points

(arrows denote positive direction)

SECTION 6.3: VECTORS IN THE PLANE

A Tutorial on Euler Angles and Quaternions

4.1 Distance and Length

Chapter 8. Rigid transformations

The Cross Product of Two Vectors

Matrices. VCE Maths Methods - Unit 2 - Matrices

9.1 VECTORS. A Geometric View of Vectors LEARNING OBJECTIVES. = a, b

Review of Coordinate Systems

Transformation of kinematical quantities from rotating into static coordinate system

11.4 Polar Coordinates

Span and Linear Independence

Vector Geometry. Chapter 5

Properties of Transformations

15. Eigenvalues, Eigenvectors

1.1 Single Variable Calculus versus Multivariable Calculus Rectangular Coordinate Systems... 4

Optical flow. Subhransu Maji. CMPSCI 670: Computer Vision. October 20, 2016

( ) ( ) ( ) 2 6A: Special Trig Limits! Math 400

Linear Algebra & Geometry why is linear algebra useful in computer vision?

Mathematics Trigonometry: Unit Circle

Determinant and Trace

4 Strain true strain engineering strain plane strain strain transformation formulae

Rotation of Axes. By: OpenStaxCollege

Lecture 4: Affine Transformations. for Satan himself is transformed into an angel of light. 2 Corinthians 11:14

Linear Algebra March 16, 2019

What you will learn today

Advanced Higher Grade

Mechanics Physics 151

9.1 VECTORS. A Geometric View of Vectors LEARNING OBJECTIVES. = a, b

All parabolas through three non-collinear points

KINEMATIC RELATIONS IN DEFORMATION OF SOLIDS

CSE 167: Introduction to Computer Graphics Lecture #2: Linear Algebra Primer

MATH 532, 736I: MODERN GEOMETRY

Example 25: Determine the moment M AB produced by force F in Figure which tends to rotate the rod about the AB axis.

Section 5.8. (i) ( 3 + i)(14 2i) = ( 3)(14 2i) + i(14 2i) = {( 3)14 ( 3)(2i)} + i(14) i(2i) = ( i) + (14i + 2) = i.

Overview. Distances in R 3. Distance from a point to a plane. Question

ME 7502 Lecture 2 Effective Properties of Particulate and Unidirectional Composites

Transcription:

2D Geometric Transformations (Chapter 5 in FVD)

2D geometric transformation Translation Scaling Rotation Shear Matri notation Compositions Homogeneous coordinates 2

2D Geometric Transformations Question: How do we represent a geometric object in the plane? Answer: For now, assume that objects consist of points and lines. A point is represented b its Cartesian coordinates: (,). Question: How do we transform a geometric object in the plane? Answer: Let (A,B) be a straight line segment and T a general 2D transformation: T transforms (A,B) into another straight line segment (A,B ), where A =TA and B =TB. 3

Translation Translate (a,b): (,) (+a,+b) Translate(2,4) 4

Scale Scale (a,b): (,) (a,b) Scale (2,3) Scale (2,3) 5

How can we scale an object without moving its origin (lower left corner)? Translate(-,-) Translate(,) Scale(2,3) 6

Reflection Scale(-,) Scale(,-) 7

Rotation Rotate(θ): (,) ( cos(θ)+ sin(θ), - sin(θ)+ cos(θ)) Rotate(9) Rotate(9) 8

How can we rotate an object without moving its origin (lower left corner)? Translate(-,-) Translate(,) Rotate(9) 9

Shear Shear (a,b): (,) (+a,+b) Shear(,) Shear(,2)

Composition of Transformations Rigid transformation: Translation + Rotation (distance preserving). Similarit transformation: Translation + Rotation + uniform Scale (angle preserving). Affine transformation: Translation + Rotation + Scale + Shear (parallelism preserving). All above transformations are groups where Rigid Similarit Affine.

Affine Similarit Rigid 2

Matri Notation Let s treat a point (,) as a 2 matri (a column vector): What happens when this vector is multiplied b a 22 matri? a c b d = a c + + b d 3

2D Transformations 2D object is represented b points and lines that join them. Transformations can be applied onl to the the points defining the lines. A point (,) is represented b a 2 column vector, and we can represent 2D transformations using 22 matrices: ' ' a = c b d 4

Scale Scale(a,b): (,) (a,b) a b a = b If a or b are negative, we get reflection. Inverse: S - (a,b)=s(/a,/b) 5

6 Reflection Reflection through the ais: Reflection through the ais: Reflection through =: Reflection through =-:

Shear, Rotation Shear(a,b): (,) (+a,+b) b a = + + a b Rotate(θ): (,) (cosθ+sinθ, -sinθ + cosθ) cosθ sinθ Inverse: sinθ cosθ + sinθ = cosθ sinθ + cosθ R - (θ)=r T (θ)=r(-θ) 7

Composition of Transformations A sequence of transformations can be collapsed into a single matri: [ ][ ][ ] [ ] A B C Note: order of transformations is important! (otherwise - commutative groups) = D translate rotate rotate translate 8

Composition of Transformations (Cont.) D = A B C D - = C - B - A - Proof: D * D- = ABC * C-B-A- = AB* I * B- * A- = A*I*A = I 9

Translation Translation(a,b): Problem: Cannot represent translation using 22 matrices. + + a b Solution: Homogeneous Coordinates 2

Homogeneous Coordinates Homogeneous Coordinates is a mapping from R n to R n+ : (, ) ( X, Y, W) = ( t, t, t) Note:(t,t,t) all correspond to the same non-homogeneous point (,). E.g. (2,3,) (6,9,3). Inverse mapping: X Y ( X, Y, W ), W W 2

22 Translation Translate(a,b): Inverse: T - (a,b)=t(-a,-b) Affine transformation now have the following form: + + = b a b a f d c e b a

Geometric Interpretation W (X,Y,) Y (X,Y,W) A 2D point is mapped to a line (ra) in 3D. The non-homogeneous points are obtained b projecting the ras onto the plane Z=. X 23

24 Eample: Rotation about an arbitrar point: Actions: Translate the coordinates so that the origin is at (, ). Rotate b θ. Translate back. (, ) θ + = = sin ) cos ( cos sin sin ) cos ( sin cos cos sin sin cos θ θ θ θ θ θ θ θ θ θ θ θ

Another eample: Reflection about an Arbitrar Line: p 2 p L=p +t (p 2 -p )=t p 2 +(-t) p Actions: Translate the coordinates so that P is at the origin. Rotate so that L aligns with the - ais. Reflect about the -ais. Rotate back. Translate back. 25

Change of Coordinates It is often requires the transformation of object description from one coordinate sstem to another. How do we transform between two Cartesian coordinate sstems? Rule: Transform one coordinate frames towards the other in the opposite direction of the representation change. Representation Transformation 26

Change of Coordinates (Cont.) Eample: X P O Y X P O Y 27

Eample: Represent the point P=( p, p,) in the (, ) coordinate sstem. where P ' =MP M = R T cosθ = sinθ sinθ cosθ ( p, p ) (, ) θ 28

29 Alternative method: Assume =(u,u ) and =(v,v ) in the (,) coordinate sstem. (, ) P =MP ' = v v u u M where (u,u ) (v,v )

3 Eample: P is at the ais P=(v,v ): What is the inverse? (u,u ) (v,v ) = = = ' v v v v u u MP P

3 Another eample: Reflection about an Arbitrar Line: Define a coordinate sstems (u,v) parallel to P P 2 : p p 2 = u u p p p p 2 2 u = = v v u u v = p p v v u u v u v u p p M