430 likes | 647 Views
Mathematics for Computer Graphics. Lecture Summary. Matrices Some fundamental operations Vectors Some fundamental operations Geometric Primitives: Points, Lines, Curves, Polygons. 2D Modeling Transformations. Modeling Coordinates. Scale Translate. y. x. Scale Rotate Translate.
E N D
Lecture Summary • Matrices • Some fundamental operations • Vectors • Some fundamental operations • Geometric Primitives: • Points, Lines, Curves, Polygons
2D Modeling Transformations Modeling Coordinates Scale Translate y x Scale Rotate Translate World Coordinates
2D Modeling Transformations Modeling Coordinates y x Let’s lookat this indetail… World Coordinates
2D Modeling Transformations Modeling Coordinates y x Initial locationat (0, 0) withx- and y-axesaligned
2D Modeling Transformations Modeling Coordinates y x Scale .3, .3 Rotate -90 Translate 5, 3
2D Modeling Transformations Modeling Coordinates y x Scale .3, .3 Rotate -90 Translate 5, 3
2D Modeling Transformations Modeling Coordinates y x 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 amn 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 = ? • Ex. , find A+B = ?
Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1
Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1
Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1
Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1
Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1
Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1
Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1
Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1
Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1
Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1
Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1
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 = BTAT • A(sB) = sAB