Affine transformations

Similar documents
Affine transformations. Brian Curless CSE 557 Fall 2014

Affine transformations

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

Affine transformations

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

Vector and Affine Math

CS 378: Computer Game Technology

CS 354R: Computer Game Technology

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

Graphics Example: Type Setting

Linear and affine transformations

MATRIX TRANSFORMATIONS

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

2D Geometric Transformations. (Chapter 5 in FVD)

1 HOMOGENEOUS TRANSFORMATIONS

Eigenvectors and Eigenvalues 1

LESSON 35: EIGENVALUES AND EIGENVECTORS APRIL 21, (1) We might also write v as v. Both notations refer to a vector.

Computer Graphics: 2D Transformations. Course Website:

Lecture 8: Coordinate Frames. CITS3003 Graphics & Animation

12.1 Systems of Linear equations: Substitution and Elimination

CS-184: Computer Graphics. Today

6. Linear transformations. Consider the function. f : R 2 R 2 which sends (x, y) (x, y)

15. Eigenvalues, Eigenvectors

Identifying second degree equations

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

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

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

Math 369 Exam #1 Practice Problems

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

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

Unit 12 Study Notes 1 Systems of Equations

Demonstrate solution methods for systems of linear equations. Show that a system of equations can be represented in matrix-vector form.

Physically Based Rendering ( ) Geometry and Transformations

VECTORS IN THREE DIMENSIONS

Strain Transformation and Rosette Gage Theory

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

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

14.1 Systems of Linear Equations in Two Variables

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

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

Section 1.2: A Catalog of Functions

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

Homework Notes Week 6

CSE4030 Introduction to Computer Graphics

MATH 1324 (Finite Mathematics or Business Math I) Lecture Notes Author / Copyright: Kevin Pinegar

Review of Prerequisite Skills, p. 350 C( 2, 0, 1) B( 3, 2, 0) y A(0, 1, 0) D(0, 2, 3) j! k! 2k! Section 7.1, pp

16.5. Maclaurin and Taylor Series. Introduction. Prerequisites. Learning Outcomes

Chapter Adequacy of Solutions

Vectors in Two Dimensions

Get Solution of These Packages & Learn by Video Tutorials on Matrices

3.7 InveRSe FUnCTIOnS

Engineering Mathematics I

1 Overview. CS348a: Computer Graphics Handout #8 Geometric Modeling Original Handout #8 Stanford University Thursday, 15 October 1992

ES.1803 Topic 16 Notes Jeremy Orloff

11.4 Polar Coordinates

CSC Computer Graphics

Lecture 27: More on Rotational Kinematics

Linear programming: Theory

Lecture 5. Equations of Lines and Planes. Dan Nichols MATH 233, Spring 2018 University of Massachusetts.

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

APPENDIX D Rotation and the General Second-Degree Equation

Space frames. b) R z φ z. R x. Figure 1 Sign convention: a) Displacements; b) Reactions

Matrices. VCE Maths Methods - Unit 2 - Matrices

Linear algebra in turn is built on two basic elements, MATRICES and VECTORS.

KINEMATIC RELATIONS IN DEFORMATION OF SOLIDS

x y plane is the plane in which the stresses act, yy xy xy Figure 3.5.1: non-zero stress components acting in the x y plane

Lecture 1a. Complex numbers, phasors and vectors. Introduction. Complex numbers. 1a.1

MATH LECTURE NOTES FIRST ORDER SEPARABLE DIFFERENTIAL EQUATIONS OVERVIEW

Math 214 Spring problem set (a) Consider these two first order equations. (I) dy dx = x + 1 dy

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

8. BOOLEAN ALGEBRAS x x

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

Handout for Adequacy of Solutions Chapter SET ONE The solution to Make a small change in the right hand side vector of the equations

Analytic Geometry in Three Dimensions

Lecture 3. Motion in more than one dimension

5. Nonholonomic constraint Mechanics of Manipulation

Equations of lines in

Polynomial approximation and Splines

CCSSM Algebra: Equations

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

Math Notes on sections 7.8,9.1, and 9.3. Derivation of a solution in the repeated roots case: 3 4 A = 1 1. x =e t : + e t w 2.

TROPICAL SCHEME THEORY

A Tutorial on Euler Angles and Quaternions

Week 3 September 5-7.

Module 3, Section 4 Analytic Geometry II

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

Chapter 8. Rigid transformations

Two Dimensional Linear Systems of ODEs

Vector Calculus Review

Dynamics and control of mechanical systems

Gauss and Gauss Jordan Elimination

Roger Johnson Structure and Dynamics: The 230 space groups Lecture 3

ANALYTICAL GEOMETRY Revision of Grade 10 Analytical Geometry

Ground Rules. PC1221 Fundamentals of Physics I. Coordinate Systems. Cartesian Coordinate System. Lectures 5 and 6 Vectors.

In this chapter a student has to learn the Concept of adjoint of a matrix. Inverse of a matrix. Rank of a matrix and methods finding these.

6. COORDINATE GEOMETRY

Functions. Introduction

Lines and Planes 1. x(t) = at + b y(t) = ct + d

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

1 k. cos tan? Higher Maths Non Calculator Practice Practice Paper A. 1. A sequence is defined by the recurrence relation u 2u 1, u 3.

Transcription:

Reading Optional reading: Affine transformations Brian Curless CSE 557 Autumn 207 Angel and Shreiner: 3., 3.7-3. Marschner and Shirle: 2.3, 2.4.-2.4.4, 6..-6..4, 6.2., 6.3 Further reading: Angel, the rest of Chapter 3 Fole, et al, Chapter 5.-5.5. David F. Rogers and J. Alan Adams, Mathematical Elements for Computer Graphics, 2 nd Ed., McGraw-Hill, New York, 990, Chapter 2. 2 Geometric transformations Vector representation Geometric transformations will map points in one space to points in another: (,, ) = f (,, ). These transformations can be ver simple, such as scaling each coordinate, or comple, such as nonlinear twists and bends. We'll focus on transformations that can be represented easil with matri operations. We can represent a point, p = (, ), in the plane or p = (,, ) in 3D space: as column vectors as row vectors 3 4

Canonical aes Vector length and dot products v u 5 6 Vector cross products Representation, cont. v u We can represent a 2-D transformation M b a matri a b c d If p is a column vector, M goes on the left: p' Mp ' ' a b c d If p is a row vector, M T goes on the right: ' p' pm T ' a b c d We will use column vectors. 7 8

Two-dimensional transformations Identit Here's all ou get with a 2 2 transformation matri M : So: ' ' a b c d ' a b ' c d Suppose we choose a = d =, b = c = 0: Gives the identit matri: 0 0 Doesn't move the points at all We will develop some intimac with the elements a, b, c, d 9 0 Scaling Suppose we set b = c = 0, but let a and d take on an positive value: Gives a scaling matri: a 0 0 d Provides differential (non-uniform) scaling in and : ' a ' d Suppose we keep b = c = 0, but let either a or d go negative. Eamples: 0 0 0 0 2 0 0 2 2 0 0 2 2

Now let's leave a = d = and eperiment with b... Effect on unit square Let's see how a general 2 2 transformation M affects the unit square: The matri gives: b 0 ' b ' a c a c b d b d q r s t 0 0 0 0 q' r' s' t' 0 a a b b 0 c c d d 0 3 4 Effect on unit square, cont. Rotation Observe: Origin invariant under M M can be determined just b knowing how the corners (,0) and (0,) are mapped a and d give - and -scaling b and c give - and -shearing From our observations of the effect on the unit square, it should be eas to write down a matri for rotation about the origin : 0 0 5 Thus, M R() 6

Linear transformations Limitations of the 2 2 matri The unit square observations also tell us the 22 matri transformation implies that we are representing a point in a new coordinate sstem: p' Mp a b c d u v u v A 2 2 linear transformation matri allows Scaling Rotation Reflection Shearing Q: What important operation does that leave out? where u=[a c] T and v=[b d] T are vectors that define a new basis for a linear space. The transformation to this new basis (a.k.a., change of basis) is a linear transformation. 7 8 Affine transformations In order to incorporate the idea that both the basis and the origin can change, we augment the linear space u, v with an origin t. We call u, v, and t (basis and origin) a frame for an affine space. Then, we can represent a change of frame as: p' u v t This change of frame is also known as an affine transformation. How do we write an affine transformation with matrices? Homogeneous coordinates Idea is to loft the problem up into 3-space, adding a third component to ever point: Adding the third w component puts us in homogenous coordinates. And then transform with a 3 3 matri: ' 0 t ' T (t) 0 t w' 0 0 0 0 2 0 0 9... gives translation! 20

Anatom of an affine matri Rotation about arbitrar points The addition of translation to linear transformations gives us affine transformations. In matri form, 2D affine transformations alwas look like this: a b t M c d t A t 0 0 0 0 2D affine transformations alwas have a bottom row of [0 0 ]. Until now, we have onl considered rotation about the origin. With homogeneous coordinates, ou can specif a rotation b, about an point q = [q q ] T with a matri. Let s do this with rotation and translation matrices of the form R( ) and T(t), respectivel. An affine point is a linear point with an added w-coordinate which is alwas : p aff p lin Appling an affine transformation gives another affine point: Ap Mp aff lin t 2. Translate q to origin 2. Rotate 3. Translate back 22 Points and vectors Vectors have an additional coordinate of w = 0. Thus, a change of origin has no effect on vectors. Q: What happens if we multipl a vector b an affine matri? Combinations of points Note that we seem to have constructed a point b adding points together, which we said was illegal, but as long as the have coefficients that sum to one, it s ok. More generall, a weighted sum of points A i : These representations reflect some of the rules of affine operations on points and vectors: vector + vector scalar vector point - point point + vector point + point scalar vector + scalar vector scalar point + scalar point One useful combination of affine operations is: P() t P tu o is an affine combination if: n i i It is a vector combination if: n i 0 i And it is a conve combination if: n i and i 0 i A conve combination of points will alwas lie in the conve hull of those points. Q: What does this describe? 23 24

Barcentric coordinates A set of points can be used to create an affine frame. Consider a triangle ABC and a point P : C P B A We can form a frame with an origin C and the vectors from C to the other vertices: u B A v C A t A We can then write P in this affine coordinate frame: Computing barcentric coordinates Writing out the barcentric combination of points leads to a linear sstem: A B C P A BC P A B C P A B C P A B C P A cool result is that we can write the solution as: P u v t (B P) (C P) 2D (B A) 2D (C A) (C P) (A P) 2D (B A) 2D (C A) (A P) (B P) 2D (B A) 2D (C A) which can be interpreted geometricall as: C The coordinates (,, ) are called the barcentric coordinates of P relative to A, B, and C. 25 SArea(PBC) SArea(ABC) SArea(APC) SArea(ABC) SArea(ABP) SArea(ABC) Q: What does it mean for a barcentric coordinate to be negative? A P B 26 Basic 3-D transformations: scaling Translation in 3D Some of the 3-D transformations are just like the 2-D ones. For eample, scaling: ' s 0 0 0 ' 0 s ' 0 0 0 0 s 0 0 0 0 ' 0 0 t ' 0 0 t ' 0 0 t 0 0 0 27 28

Rotation in 3D For an transformation, we can count its degrees of freedom the number of independent (though not necessaril unique) parameters needed to specif the transformation. One wa to count them is to add up all the apparentl free variables and subtract the number of independent equations that constrain them. How man degrees of freedom are there in an arbitrar 3D rotation? Rotation in 3D (cont d) These are the rotations about the canonical aes: R ( ) 0 0 0 0 cos sin 0 0 sin cos 0 0 0 0 R ( ) R cos 0 sin 0 0 0 0 sin 0 cos 0 R 0 0 0 R R ( ) cos sin 0 0 Use right hand rule sin cos 0 0 0 0 0 0 0 0 A general rotation can be specified in terms of a product of these three matrices. How else might ou specif a rotation? 29 30 Shearing in 3D Shearing is also more complicated. Here is one eample: ' ' ' b 0 0 0 0 0 0 0 0 0 0 0 Preservation of affine combinations A transformation F is an affine transformation if it preserves affine combinations: where the A i are points, and: n i Clearl, the matri form of F has this propert. i One special eample is a matri that drops a dimension. For eample: 0 0 0 0 0 0 0 0 0 We call this a shear with respect to the - plane. This transformation, known as an orthographic projection is an affine transformation. We ll use this fact later 3 32

Properties of affine transformations Here are some useful properties of affine transformations: Lines map to lines Parallel lines remain parallel Midpoints map to midpoints (in fact, ratios are alwas preserved) pq s p'q' ratio qr t q'r' Summar What to take awa from this lecture: All the names in boldface. How points and transformations are represented. How to compute lengths, dot products, and cross products of vectors, and what their geometrical meanings are. What all the elements of a 2 2 transformation matri do and how these generalie to 3 3 transformations. What homogeneous coordinates are and how the work for affine transformations. How to concatenate transformations. The mathematical properties of affine transformations. 33 34