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

Similar documents
Linear and affine transformations

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

Vector and Affine Math

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

CS-184: Computer Graphics. Today

CS 378: Computer Game Technology

Affine transformations. Brian Curless CSE 557 Fall 2014

Affine transformations

2D Geometric Transformations. (Chapter 5 in FVD)

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

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

Computer Graphics: 2D Transformations. Course Website:

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

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

Graphics Example: Type Setting

Affine transformations

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

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

CS 354R: Computer Game Technology

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

Transformations. Chapter D Transformations Translation

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

Affine transformations

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

Graphics Rendering Pipeline

TENSOR TRANSFORMATION OF STRESSES

Lines and points. Lines and points

Lecture 8: Coordinate Frames. CITS3003 Graphics & Animation

Matrix Calculations: Linear maps, bases, and matrices

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

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

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

Physically Based Rendering ( ) Geometry and Transformations

Lecture 27: More on Rotational Kinematics

AM 106/206: Applied Algebra Madhu Sudan 1. Lecture Notes 12

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

Mechanics Physics 151

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

Vector Operations. Lecture 19. Robb T. Koether. Hampden-Sydney College. Wed, Oct 7, 2015

KINEMATIC RELATIONS IN DEFORMATION OF SOLIDS

3D Coordinate Transformations. Tuesday September 8 th 2015

CSC 470 Introduction to Computer Graphics. Mathematical Foundations Part 2

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

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

Computer Graphics MTAT Raimond Tunnel

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

A Tutorial on Euler Angles and Quaternions

I&C 6N. Computational Linear Algebra

Mathematics for 3D Graphics

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

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

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

Mathematics of Cryptography Part I

Find the component form of with initial point A(1, 3) and terminal point B(1, 3). Component form = 1 1, 3 ( 3) (x 1., y 1. ) = (1, 3) = 0, 6 Subtract.

The Affine Group of Transformations

Chapter 6 Additional Topics in Trigonometry, Part II

The Cross Product. Philippe B. Laval. Spring 2012 KSU. Philippe B. Laval (KSU) The Cross Product Spring /

CSE4030 Introduction to Computer Graphics

Lecture 02: 2D Geometry. August 24, 2017

Why Transforms? Want to animate objects and camera Translations Rotations Shears And more.. Want to be able to use projection transforms

Homogeneous Coordinates

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

Mathematical Fundamentals

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

Brief Review of Exam Topics

6.837 LECTURE 8. Lecture 8 Outline Fall '01. Lecture Fall '01

1 Last time: multiplying vectors matrices

Distance Between Ellipses in 2D

Math 3C Lecture 20. John Douglas Moore

Rigid Body Dynamics, SG2150 Solutions to Exam,

Test 2 Review Math 1111 College Algebra

ES.1803 Topic 16 Notes Jeremy Orloff

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

Matrices and Deformation

Geometric Image Manipulation

Interpolation of Rigid Motions in 3D

1 Matrices and matrix algebra

MATRIX TRANSFORMATIONS

15. Eigenvalues, Eigenvectors

TIEA311 Tietokonegrafiikan perusteet kevät 2018

Analytic Geometry in Three Dimensions

Linear Algebra. Preliminary Lecture Notes

Introduction to Differential Equations

Exercises for Unit I I (Vector algebra and Euclidean geometry)

Winter 2017 Ma 1b Analytical Problem Set 2 Solutions

ED209 TWO DIMENSIONAL TRANSFORMATIONS

What is the Matrix? Linear control of finite-dimensional spaces. November 28, 2010

Introduction and Vectors Lecture 1

Lecture 11: Clifford algebras

Minimal representations of orientation

Image Registration Lecture 2: Vectors and Matrices

Vectors and Matrices

ISOMETRIES OF R n KEITH CONRAD

be ye transformed by the renewing of your mind Romans 12:2

Coordinates for Projective Planes

MATH 221: SOLUTIONS TO SELECTED HOMEWORK PROBLEMS

Chapter 6. Additional Topics in Trigonometry. 6.6 Vectors. Copyright 2014, 2010, 2007 Pearson Education, Inc.

Chapter 1: Linear Equations

Motion in Three Dimensions

4.2. ORTHOGONALITY 161

Transcription:

CS 4300 Computer Graphics Prof. Harriet Fell Fall 2011 Lecture 11 September 29, 2011 October 8, 2011 College of Computer and Information Science, Northeastern Universit 1

Toda s Topics Linear Algebra Review Matrices Transformations New Linear Algebra Homogeneous Coordinates October 8, 2011 College of Computer and Information Science, Northeastern Universit 2

Matrices b b b c c c c 11 12 13 14 11 12 13 a11 a 12 c21 c22 c23 c 24 A = B b21 b22 b 23 C a21 a = = 22 c31 c32 c33 c34 b31 b32 b33 c41 c42 c43 c44 We use 22, 33, and 44 matrices in computer graphics. We ll start with a review of 2D matrices and transformations. October 8, 2011 College of Computer and Information Science, Northeastern Universit 3

Basic 2D Linear Transforms a11 a12 a11 + a12 a a = a + a 21 22 21 22 a11 a12 1 a11 a11 a12 0 a12 a a 0 = = a a a 1 a 21 22 21 21 22 22 October 8, 2011 College of Computer and Information Science, Northeastern Universit 4

Scale b.5 scale (.5,.5).5 0 0.5 (1, 0) (0.5, 0) = (0, 1) (0, 0.5) October 8, 2011 College of Computer and Information Science, Northeastern Universit 5

Scaling b.5 0.5 0 0 0.5 October 8, 2011 College of Computer and Information Science, Northeastern Universit 6

General Scaling s 0 1 s s = 0 s 0 0 0 0 0 0 s 1 = s October 8, 2011 College of Computer and Information Science, Northeastern Universit 7

General Scaling 1 scale s (, ) s s 0 0 s = s 1 s October 8, 2011 College of Computer and Information Science, Northeastern Universit 8

rot( ϕ) = Rotation cos( ϕ) sin( ϕ) sin( ϕ) cos( ϕ) φ cos(φ) sin(φ) -sin(φ) φ cos(φ) October 8, 2011 College of Computer and Information Science, Northeastern Universit 9

Rotation rot( ϕ) = cos( ϕ) sin( ϕ) sin( ϕ) cos( ϕ) φ October 8, 2011 College of Computer and Information Science, Northeastern Universit 10

Reflection in -ais reflect- = 1 0 0 1 October 8, 2011 College of Computer and Information Science, Northeastern Universit 11

Reflection in -ais reflect- = 1 0 0 1 October 8, 2011 College of Computer and Information Science, Northeastern Universit 12

Reflection in -ais reflect- = 1 0 0 1 October 8, 2011 College of Computer and Information Science, Northeastern Universit 13

Reflection in -ais reflect- = 1 0 0 1 October 8, 2011 College of Computer and Information Science, Northeastern Universit 14

Shear- shear-( s) = 1 s 0 1 s October 8, 2011 College of Computer and Information Science, Northeastern Universit 15

Shear 1 s 0 1 October 8, 2011 College of Computer and Information Science, Northeastern Universit 16

Shear- shear-( s) = 1 0 s 1 s October 8, 2011 College of Computer and Information Science, Northeastern Universit 17

Shear 1 0 s 1 October 8, 2011 College of Computer and Information Science, Northeastern Universit 18

Linear Transformations Scale, Reflection, Rotation, and Shear are all linear transformations The satisf: T(au + bv) = at(u) + bt(v) u and v are vectors a and b are scalars If T is a linear transformation T((0, 0)) = (0, 0) October 8, 2011 College of Computer and Information Science, Northeastern Universit 19

Composing Linear Transformations If T 1 and T 2 are transformations T 2 T 1 (v) = def T 2 ( T 1 (v)) If T 1 and T 2 are linear and are represented b matrices M 1 and M 2 T 2 T 1 is represented b M 2 M 1 T 2 T 1 (v) = T 2 ( T 1 (v)) = (M 2 M 1 )(v) October 8, 2011 College of Computer and Information Science, Northeastern Universit 20

Reflection About an Arbitrar Line (through the origin) October 8, 2011 College of Computer and Information Science, Northeastern Universit 21

Reflection as a Composition October 8, 2011 College of Computer and Information Science, Northeastern Universit 22

Decomposing Linear Transformations An 2D Linear Transformation can be decomposed into the product of a rotation, a scale, and a rotation if the scale can have negative numbers. M = R 1 SR 2 October 8, 2011 College of Computer and Information Science, Northeastern Universit 23

Rotation about an Arbitrar Point φ φ This is not a linear transformation. The origin moves. October 8, 2011 College of Computer and Information Science, Northeastern Universit 24

Translation (, ) (+a,+b) (a, b) This is not a linear transformation. The origin moves. October 8, 2011 College of Computer and Information Science, Northeastern Universit 25

Homogeneous Coordinates Embed the -plane in R 3 at z = 1. (, ) (,, 1) z October 8, 2011 College of Computer and Information Science, Northeastern Universit 26

2D Linear Transformations as 3D Matrices An 2D linear transformation can be represented b a 22 matri a11 a12 a11 + a12 a a = a + a 21 22 21 22 or a 33 matri a11 a12 0 a11 + a12 a a 0 = a + a 21 22 21 22 0 0 1 1 1 October 8, 2011 College of Computer and Information Science, Northeastern Universit 27

2D Linear Translations as 3D Matrices An 2D translation can be represented b a 33 matri. 1 0 a + a 0 1 b = + b 0 0 1 1 1 This is a 3D shear that acts as a translation on the plane z = 1. October 8, 2011 College of Computer and Information Science, Northeastern Universit 28

Translation as a Shear z October 8, 2011 College of Computer and Information Science, Northeastern Universit 29

2D Affine Transformations An affine transformation is an transformation that preserves co-linearit (i.e., all points ling on a line initiall still lie on a line after transformation) and ratios of distances (e.g., the midpoint of a line segment remains the midpoint after transformation). With homogeneous coordinates, we can represent all 2D affine transformations as 3D linear transformations. We can then use matri multiplication to transform objects. October 8, 2011 College of Computer and Information Science, Northeastern Universit 30

Rotation about an Arbitrar Point φ φ October 8, 2011 College of Computer and Information Science, Northeastern Universit 31

Rotation about an Arbitrar Point T(c, c ) R(φ) T(-c, -c ) φ φ October 8, 2011 College of Computer and Information Science, Northeastern Universit 32

Windowing Transforms (A,B) (a,b) translate (A-a,B-b) scale (C-c,D-d) (C,D) translate (c,d) October 8, 2011 College of Computer and Information Science, Northeastern Universit 33

3D Transformations Remember: z z 1 A 3D linear transformation can be represented b a 33 matri. a a a a a a 0 11 12 13 11 12 13 a21 a22 a22 0 a21 a22 a 23 a31 a32 a33 0 a31 a32 a33 0 0 0 1 October 8, 2011 College of Computer and Information Science, Northeastern Universit 34

( s ) s sz scale,, 3D Affine Transformations s 0 0 0 0 s 0 0 = 0 0 sz 0 0 0 0 1 ( t ) t tz translate,, 1 0 0 t 0 1 0 t = 0 0 1 tz 0 0 0 1 October 8, 2011 College of Computer and Information Science, Northeastern Universit 35

3D Rotations rotate rotate z ( θ ) ( θ ) 1 0 0 0 0 cos( θ ) sin( θ ) 0 = 0 sin( θ ) cos( θ ) 0 0 0 0 1 ( θ ) ( θ ) ( θ ) ( θ ) rotate cos sin 0 0 sin cos 0 0 = 0 0 1 0 0 0 0 1 ( θ ) ( θ ) ( θ ) cos 0 sin 0 0 1 0 0 = sin( θ ) 0 cos( θ ) 0 0 0 0 1 October 8, 2011 College of Computer and Information Science, Northeastern Universit 36