Graphics Example: Type Setting

Similar documents
2D Geometric Transformations. (Chapter 5 in FVD)

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

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

Affine transformations

Affine transformations. Brian Curless CSE 557 Fall 2014

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

Affine transformations

CS 378: Computer Game Technology

Linear and affine transformations

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

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

1 HOMOGENEOUS TRANSFORMATIONS

Vector and Affine Math

15. Eigenvalues, Eigenvectors

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

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

MATRIX TRANSFORMATIONS

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

CS-184: Computer Graphics. Today

Eigenvectors and Eigenvalues 1

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

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

Solutions Week 2. D-ARCH Mathematics Fall Linear dependence & matrix multiplication. 1. A bit of vector algebra.

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

CSC Computer Graphics

Practical Linear Algebra: A Geometry Toolbox

RELATIONS AND FUNCTIONS through

APPENDIX D Rotation and the General Second-Degree Equation

Physically Based Rendering ( ) Geometry and Transformations

Infinitesimal Rotations

Unit 12 Study Notes 1 Systems of Equations

Engineering Mathematics I

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

Computer Graphics: 2D Transformations. Course Website:

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

Math 3108: Linear Algebra

Geometry review, part I

Analytic Geometry in Three Dimensions

A VERY BRIEF LINEAR ALGEBRA REVIEW for MAP 5485 Introduction to Mathematical Biophysics Fall 2010

KINEMATIC RELATIONS IN DEFORMATION OF SOLIDS

Systems of Linear and Quadratic Equations. Check Skills You ll Need. y x. Solve by Graphing. Solve the following system by graphing.

Second-Order Linear Differential Equations C 2

Rising HONORS Algebra 2 TRIG student Summer Packet for 2016 (school year )

Vertex. March 23, Ch 9 Guided Notes.notebook

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

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

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

CS 354R: Computer Game Technology

9.2. Cartesian Components of Vectors. Introduction. Prerequisites. Learning Outcomes

A Tutorial on Euler Angles and Quaternions

8. BOOLEAN ALGEBRAS x x

Vectors in Two Dimensions

A = 3 B = A 1 1 matrix is the same as a number or scalar, 3 = [3].

Identifying second degree equations

10.5. Polar Coordinates. 714 Chapter 10: Conic Sections and Polar Coordinates. Definition of Polar Coordinates

Symmetry Arguments and the Role They Play in Using Gauss Law

1.3. Absolute Value and Piecewise-Defined Functions Absolutely Piece-ful. My Notes ACTIVITY

Trigonometry Outline

Transformations. Chapter D Transformations Translation

ARCH 331 Note Set 3.1 Su2016abn. Forces and Vectors

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

MATH 423 Linear Algebra II Lecture 10: Inverse matrix. Change of coordinates.

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

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

Unit 2 Notes Packet on Quadratic Functions and Factoring

4 Strain true strain engineering strain plane strain strain transformation formulae

STATICS. Equivalent Systems of Forces. Vector Mechanics for Engineers: Statics VECTOR MECHANICS FOR ENGINEERS: Contents & Objectives.

03 - Basic Linear Algebra and 2D Transformations

Ch 3 Alg 2 Note Sheet.doc 3.1 Graphing Systems of Equations

Trusses - Method of Sections

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

Ready To Go On? Skills Intervention 5-1 Using Transformations to Graph Quadratic Functions

Multiple Choice. 3. The polygons are similar, but not necessarily drawn to scale. Find the values of x and y.

Module 3, Section 4 Analytic Geometry II

Affine transformations

12.1 Systems of Linear equations: Substitution and Elimination

Homogeneous Coordinates

Outline. MA 138 Calculus 2 with Life Science Applications Linear Maps (Section 9.3) Graphical Representation of (Column) Vectors. Addition of Vectors

Review of Essential Skills and Knowledge

Today. CS-184: Computer Graphics. Introduction. Some Examples. 2D Transformations

+ dxk. dt 2. dt Γi km dxm. . Its equations of motion are second order differential equations. with intitial conditions

MAT 1275: Introduction to Mathematical Analysis. Graphs and Simplest Equations for Basic Trigonometric Functions. y=sin( x) Function

Determinants. We said in Section 3.3 that a 2 2 matrix a b. Determinant of an n n Matrix

1.2 Functions and Their Properties PreCalculus

Applications. 12 The Shapes of Algebra. 1. a. Write an equation that relates the coordinates x and y for points on the circle.

FACULTY OF MATHEMATICAL STUDIES MATHEMATICS FOR PART I ENGINEERING. Lectures AB = BA = I,

University of Regina Department of Mathematics and Statistics

MMJ1153 COMPUTATIONAL METHOD IN SOLID MECHANICS PRELIMINARIES TO FEM

Vectors Primer. M.C. Simani. July 7, 2007

7.5 Solve Special Types of

Chapter 1 Coordinates, points and lines

Linear Equations in Linear Algebra

Computer Graphics MTAT Raimond Tunnel

International Examinations. Advanced Level Mathematics Pure Mathematics 1 Hugh Neill and Douglas Quadling

10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections )

Review of Linear Algebra

Linear Algebra (2009 Fall) Chapter 1 Matrices and Systems of Equations

Answer Explanations. The SAT Subject Tests. Mathematics Level 1 & 2 TO PRACTICE QUESTIONS FROM THE SAT SUBJECT TESTS STUDENT GUIDE

f 0 ab a b: base f

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

Transcription:

D Transformations

Graphics Eample: Tpe Setting

Modern Computerized Tpesetting Each letter is defined in its own coordinate sstem And positioned on the page coordinate sstem It is ver simple, m she thought, ou get up, ou go, ou do, ou see, ou put one foot in front of the other & along the wa ou do our ver best to enjo it.

Local vs. Global Coordinate Sstems m u Converting from local to global? v m. Map [,] to [, ]. Add 3. Map [,] to [, ] 4. Add u v ( ( ( ( ) ) ) ) u,v [,]

Map & Translate v m u Converting from local to global? Assume local is defined on [,] a p m. Map [,][,] to a a a a. Translate to p = (, ) a ua va

Two Stages: Map & Translate Two basic operations: Mapping the vector (u,v) to a new vector Translating the origin to p u v a a p va ua p v u a a a a v u a a (,)

Matri Form a a The matri A = is called a a a Linear Map and it maps a vector (u,v) to a vector (u,v ) a p a u' v' a a a a u v v (,) u Note: we forget the translation for now!

Linear Maps & Matrices We have 4 numbers in the matri An combination gives a general linear transformation (map) From Algebra we know that the preserve linear combinations: A( c c Av c Av v cv)

Working with Matrices CA BA A C B AC AB C B A C AB BC A C B A C B A BA AB A B B A ) ( ) ( ) ( ) ( ) ( ) ( ) (Note:in general Commutative Law: Associative Laws: Distributive Laws:

Special Linear Maps Special combinations of the matri entries give specific tpes of linear maps: Scale (uniform & non-uniform) Reflection Rotation Shear Projection

Scale Map: = s = s Eample: Matri form: If s s it is a non-uniform scale 3 3 (,) s s S

Mapping Objects Eample: Uniform vs. Non-uniform Scale (,) 3 4 3 Non-uniform (,) (,) Uniform (,)

Reflections (,) About (,) (,) About (,) (,) About = (,)

Rotation Given an angle the map for rotation in counterclockwise direction is: = cos()- sin() = sin()+ cos() Matri form: (,) R cos( ) sin( ) sin( ) cos( )

Rotation

Shear Map: = + h = + h Eample: Matri form: h h H (,) (,) deforms as function of

Projections Onto : (,) (,) Onto : In general if v =(, ) and v are parallel (v =cv =(c, c ) then following map is a projection onto the line of their direction (,) c c

Reducing Dimension Man vectors are all mapped to the same vector b projection In fact an line in D is projected onto a point on the projection line This is wh projections reduce the dimension Once projected, the points on the line cannot be distinguished from each other This also means there is no inverse mapping to projection (,) How about the other maps?

Inverse Maps The matri of the inverse transformation is the inverse matri of the transformation: ) cos( ) sin( ) sin( ) cos( ) cos( ) sin( ) sin( ) cos(

Combining Transformations I Matri multiplication is associative, hence instead of appling each map alone we can multipl the matrices to create the final map: cba cba cb cb c c A B A C B A M ABC C B A C B A

Eample: Rotate & Shear BA AB (,) (,) (,) B A (,) (,)

Order is Important! First shear then rotate (AB) is different than first rotate then shear (BA)! Reason: matri multiplication is NOT commutative Eception? rotations are commutative: Rotate b and then b β is the same as rotating b β and then b.

The Origin In ALL linear transformation the origin (,) remains stationar: Image(origin) = origin Problem? What operation cannot be represented?

Translation Map: = + t = + t Can be defined as p = p+v Note: since vectors do not have position, translation is an operation on points! (,) t v p t p

Affine Maps Includes both a linear map A and a translation v p = Ap+v Linear maps can be seen as a subset of affine maps (translation v = )

Eample : Rotating Around a Point We defined rotation around (,). How can we rotate in degrees around an arbitrar point q? (,) q Translate Rotate Translate back (,) (,) (,)

Eample : Rotating Around a Point. Translate q to the origin (v=q-). Rotate around the origin in degrees 3. Translate back This is an affine map: q (,) p = R (p-v)+v

Propert: Does Not Preserve Distance! A transformation that preserves distances is called an isometr. For eample: rotation, translation, reflection. However, most linear maps do not, and therefore also most affine maps don t For eample scaling: (,) (,)

Propert: Preserves Line and Ratios Assume Let A+v be an affine map that maps p, p, p 3 to p, p, p 3 Now we have: p 3 p p Affine transformations preserve ratios! p p p 3

Matri Notation? The matri notation for the general Affine transformation cannot represent translation using matrices Solution: use homogeneous coordinates

Homogeneous Coordinates August Ferdinand Möbius Homogeneous coordinates are a mapping from R n to R n+ as follows: (,) (X,Y,W) where X=W, Y=W Note: for all t the points (t,t,t) correspond to the same point (,): (,3,)(6,9,3) (4,6,). Usuall it is customar to use w= (normalize it if not)

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

Translation in Homogeneous Coordinates Using homogeneous coordinates we can represent a translation using the following matri: (,) is mapped b this matri to (+t,+t) t t t t

General Affine Maps Linear maps can still use the top left minor of the matri Hence, combining both linear maps and translation we get the general affine map matri form: f d c e b a

Combining Transformations II Multipling two affine maps creates an affine map: Hence, we can combine transformations in a similar manner as linear maps Remember: order is still important: AB BA f f d e c d d c b c d a c e f b a e b d a b b c a a f d c e b a f d c e b a

Eample Revisited Rotating around an arbitrar point (, ) sin ) cos ( cos sin sin ) cos ( sin cos cos sin sin cos Translate Rotate Translate back

Eample : Reflection About a Line. Find p on the line. Move p to the origin 3. Rotate so that the line lies on the ais 4. Reflect about the ais 5. Rotate back 6. Move back p v (,)

Geometric Stages Translate Rotate v v v p p p - (,) (,) (,) 5 Translate back 4 Rotate back 3 Reflect v v v p p p (,) (,) (,)

In Matri Form ) cos( ) sin( ) sin( ) cos( cos sin sin cos p p p p M Translate Rotate Rotate back Reflect Translate back

Defining Affine Transformations Given k points (p,p,..p k ) in D that have been transformed to (p',p',..,p' k ) b an affine transformation. How man points are needed to uniquel define the transformation? 6 unknowns a c b d e f

Three Points One pair of points can define the translation (translate p to p' ) to get e and f Now we need to define a linear transformation Using another two pairs of points we can define two pairs of vectors: v =p - p, v 3 =p 3 - p, v' =p' - p', v 3 =p' 3 - p' that uniquel define the transformation: d c b a v v v v v v v v d c b a 3 3 3 3 ' ' ' ' p p p 3 p p p 3

Mapping Two Triangles Hence, given the mapping between two triangles, or three pairs of points, defines an affine map: p p p 3 p p p 3 p p 3 p p 3 p p

Back to Coordinate Sstems In a similar manner: converting from global to local coordinate sstem is done using an affine map Conversion between an coordinate sstem is defined b an affine map (,)

Affine Transformations Properties Closed under composition Origin does not map to origin Does not preserve distances Lines map to lines Ratios are preserved Parallel lines remain parallel

Projective Transformations What if we use a full 33 matri to transform homogeneous points? We obtain a richer variet of possible maps which are called Projective warps w i h g f e d c b a w ' ' '

Transformation Eamples Original Linear: Scale & Rotate Affine Projective

Projective Transformations Properties Closed under composition Origin does not map to origin Does not preserve distances Lines map to lines Ratios are not preserved (but cross-ratios are) Parallel lines do not remain parallel

More Eamples Original Linear: Scale & Rotate Affine Projective

Special Tpes of Transformations Rigid transformation: Translation + Rotation (distance preserving). How man D.O.F? Similarit transformation: Translation + Rotation + uniform Scale (angle preserving). How man D.O.F? Affine transformation: Translation + Rotation + Scale + Shear (parallelism preserving). How man D.O.F? All above transformations are groups where Rigid Similarit Affine.

Summar of Transformations Projective Affine Similarit Rigid