Mathematics for Computer Graphics
Lecture Summary Matrices Some fundamental operations Vectors Some fundamental operations Geometric Primitives: Points, Lines, Curves, Polygons
2D Modeling Transformations Scale Rotate Translate Scale Translate x y World Coordinates Modeling Coordinates
2D Modeling Transformations x y World Coordinates Modeling Coordinates Let’s look at this in detail…
2D Modeling Transformations x y Modeling Coordinates Initial location at (0, 0) with x- and y-axes aligned
2D Modeling Transformations x y Modeling Coordinates Scale.3,.3 Rotate -90 Translate 5, 3
2D Modeling Transformations x y Modeling Coordinates Scale.3,.3 Rotate -90 Translate 5, 3
2D Modeling Transformations x y Modeling Coordinates Scale.3,.3 Rotate -90 Translate 5, 3 World Coordinates
Matrices A matrix is a rectangular array of elements (numbers, expression, or function) A matrix with m rows and n columns is said to be an m-by-n matirx ( matrix), e.g In general, we can write an m-by-n matrix as
Matrices A matrix with a single row or a single column represent a vector Single row : 1-by-n matrix is a row vector Single column : n-by-1 matrix is a column vector A square matrix is a matrix has the same number of rows as columns In graphics, we frequently work with two-by-two, three-by-three, and four- by-four matrices The zero matrix The identity matrix A diagonal matrix
Scalar Multiplication To multiply a martix A by a scalar value s, we multiply each element a mn by the scalar Ex., find 3A = ?
Matrix Addition Two matrices A and B may be added together when these two matrices have the same number of rows and column the same shape The sum is obtained by adding corresponding elements. Ex., find A+B = ?
Matrix Multiplication 1x11x33x1 2x2 3x33x1
Matrix Multiplication 1x11x33x1 2x2 3x33x1
Matrix Multiplication 1x11x33x1 2x2 3x33x1
Matrix Multiplication 1x11x33x1 2x2 3x33x1
Matrix Multiplication 1x11x33x1 2x2 3x33x1
Matrix Multiplication 1x11x33x1 2x2 3x33x1
Matrix Multiplication 1x11x33x1 2x2 3x33x1
Matrix Multiplication 1x11x33x1 2x2 3x33x1
Matrix Multiplication 1x11x33x1 2x2 3x33x1
Matrix Multiplication 1x11x33x1 2x2 3x33x1
Matrix Multiplication 1x11x33x1 2x2 3x33x1
Matrix Multiplication e.g.:
Matrix Multiplication e.g.:
Matrix Multiplication e.g.:
Matrix Multiplication e.g.:
Matrix Multiplication e.g.:
Matrix Multiplication e.g.:
Matrix Multiplication e.g.:
Matrix Multiplication e.g.:
Matrix Multiplication e.g.:
Matrix Multiplication e.g.:
Matrix Multiplication e.g.:
Matrix Multiplication e.g.:
Warning!!! but (AB)C = A(BC) A(B+C) = AB + AC (A+B)C = AC + BC (AB) T = B T A T A(sB) = sAB
Determinant of a Matrix
Matrix Inverse