1 Matrix Math ©Anthony Steed 1999. 2 Overview n To revise Vectors Matrices n New stuff Homogenous co-ordinates 3D transformations as matrices.

Slides:



Advertisements
Similar presentations
2.3 Modeling Real World Data with Matrices
Advertisements

Points, Vectors, Lines, Spheres and Matrices
1 3D Vector & Matrix Chapter 2. 2 Vector Definition: Vector is a line segment that has the direction. The length of the line segment is called the magnitude.
Transformations We want to be able to make changes to the image larger/smaller rotate move This can be efficiently achieved through mathematical operations.
3_3 An Useful Overview of Matrix Algebra
Maths for Computer Graphics
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
CS 450: Computer Graphics 2D TRANSFORMATIONS
Matrices MSU CSE 260.
Matrices The Basics Vocabulary and basic concepts.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
4.7 Identity and Inverse Matrices. What is an identity? In math the identity is the number you multiply by to have equivalent numbers. For multiplication.
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Introduction to 3D Graphics Lecture 3: General Camera Model Anthony Steed University College London.
6.837 Linear Algebra Review Patrick Nichols Thursday, September 18, 2003.
ECON 1150 Matrix Operations Special Matrices
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
Mathematics for Computer Graphics. Lecture Summary Matrices  Some fundamental operations Vectors  Some fundamental operations Geometric Primitives:
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
Transformations Jehee Lee Seoul National University.
Overview Definitions Basic matrix operations (+, -, x) Determinants and inverses.
Inverse & Identity Matrices
Matrices. Definitions  A matrix is an m x n array of scalars, arranged conceptually as m rows and n columns.  m is referred to as the row dimension.
Matrices, Transformations and the 3D Pipeline Matthew Rusch Paul Keet.
Matrices A matrix is a table or array of numbers arranged in rows and columns The order of a matrix is given by stating its dimensions. This is known as.
1 Graphics CSCI 343, Fall 2015 Lecture 10 Coordinate Transformations.
Transformations CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
3.4 Solution by Matrices. What is a Matrix? matrix A matrix is a rectangular array of numbers.
MT411 Robotic Engineering Asian Institution of Technology (AIT) Chapter 1 Introduction to Matrix Narong Aphiratsakun, D.Eng.
Computer Graphics Matrices
CSCE 552 Fall 2012 Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
MATRIX A set of numbers arranged in rows and columns enclosed in round or square brackets is called a matrix. The order of a matrix gives the number of.
Honors Geometry.  We learned how to set up a polygon / vertex matrix  We learned how to add matrices  We learned how to multiply matrices.
Section 4.3 – Multiplying Matrices. MATRIX MULTIPLICATION 1. The order makes a difference…AB is different from BA. 2. The number of columns in first matrix.
CS 450: COMPUTER GRAPHICS TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
III- 1 III 3D Transformation Homogeneous Coordinates The three dimensional point (x, y, z) is represented by the homogeneous coordinate (x, y, z, 1) In.
Unit 3: Matrices. Matrix: A rectangular arrangement of data into rows and columns, identified by capital letters. Matrix Dimensions: Number of rows, m,
Designed by Victor Help you improve MATRICES Let Maths take you Further… Know how to write a Matrix, Know what is Order of Matrices,
Matrix Algebra Definitions Operations Matrix algebra is a means of making calculations upon arrays of numbers (or data). Most data sets are matrix-type.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
Transformations. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
Robotic Arms and Matrices By Chris Wong and Chris Marino.
A very brief introduction to Matrix (Section 2.7) Definitions Some properties Basic matrix operations Zero-One (Boolean) matrices.
1 Matrix Math ©Anthony Steed Overview n To revise Vectors Matrices.
MTH108 Business Math I Lecture 20.
13.4 Product of Two Matrices
Math Fundamentals Maths revisit.
Transforms.
Computer Graphics CC416 Week 15 3D Graphics.
2D Transformations with Matrices
Review: Transformations
L6 matrix operations.
Matrix Multiplication
Matrix Operations Add and Subtract Matrices Multiply Matrices
Review: Transformations
Multiplying Matrices.
With an immediate use for it
Chapter IV Spaces and Transforms
Unit 3: Matrices
Multiplying Matrices.
Transformations.
3.6 Multiply Matrices.
Linear Algebra A gentle introduction
Multiplying Matrices.
Multiplying Matrices.
Multiplying Matrices.
Presentation transcript:

1 Matrix Math ©Anthony Steed 1999

2 Overview n To revise Vectors Matrices n New stuff Homogenous co-ordinates 3D transformations as matrices

3 Vectors and Matrices n Matrix is an array of numbers with dimensions M (rows) by N (columns) 3 by 6 matrix element 2,3 is (3) n Vector can be considered a 1 x M matrix

4 Types of Matrix n Identity matrices - I n Diagonal n Symmetric Diagonal matrices are (of course) symmetric Identity matrices are (of course) diagonal

5 Operation on Matrices n Addition Done elementwise n Transpose “Flip” (M by N becomes N by M) Anthony Steed: EQ needs fixing Anthony Steed: EQ needs fixing

6 Operations on Matrices n Multiplication Only possible to multiply of dimensions –x 1 by y 1 and x 2 by y 2 iff y 1 = x 2 resulting matrix is x 1 by y 2 –e.g. Matrix A is 2 by 3 and Matrix by 3 by 4 resulting matrix is 2 by 4 –Just because A x B is possible doesn’t mean B x A is possible!

7 Matrix Multiplication Order n A is n by k, B is k by m n C = A x B defined by n BxA not necessarily equal to AxB

8 Example Multiplications

9 Inverse n If A x B = I and B x A = I then A = B -1 and B = A -1

10 3D Transforms n In 3-space vectors are transformed by 3 by 3 matrices n Example? Anthony Steed: EQ needs fixing Anthony Steed: EQ needs fixing

11 Scale n Scale uses a diagonal matrix n Scale by 2 along x and -2 along z

12 Rotation n Rotation about z axis n Note z values remain the same whilst x and y change Y X

13 Rotation X, Y and Scale n About X n About Y n Scale (should look familiar)

14 Homogenous Points n Add 1D, but constrain that to be equal to 1 (x,y,z,1) n Homogeneity means that any point in 3- space can be represented by an infinite variety of homogenous 4D points ( ) = ( ) = ( ) n Why? 4D allows as to include 3D translation in matrix form

15 Homogenous Vectors n Vectors != Points n Remember points can not be added n If A and B are points A-B is a vector n Vectors have form (x y z 0) n Addition makes sense

16 Translation in Homogenous Form n Note that the homogenous component is preserved (* * * 1), and aside from the translation the matrix is I

17 Putting it Together n R is rotation and scale components n T is translation component

18 Order Matters n Composition order of transforms matters Remember that basic vectors change so “direction” of translations changed

19 Exercises n Show that rotation by  /2 about X and then  /2 about Y is equivalent to  /2 about Y then  /2 about X n Calculate the following matrix  /2 about X then  /2 about Y then  /2 about Z (remember “then” means multiply on the right). What is a simpler form of this matrix? n Compose the following matrix translate 2 along X, rotate  /2 about Y, translate -2 along X. Draw a figure with a few points (you will only need 2D) and then its translation under this transformation.

20 Summary n Rotation, Scale, Translation n Composition of transforms n The homogenous form