Mathematics for Computer Graphics

# Mathematics for Computer Graphics

Télécharger la présentation

## Mathematics for Computer Graphics

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. Mathematics for Computer Graphics

2. Lecture Summary • Matrices • Some fundamental operations • Vectors • Some fundamental operations • Geometric Primitives: • Points, Lines, Curves, Polygons

3. 2D Modeling Transformations Modeling Coordinates Scale Translate y x Scale Rotate Translate World Coordinates

4. 2D Modeling Transformations Modeling Coordinates y x Let’s lookat this indetail… World Coordinates

5. 2D Modeling Transformations Modeling Coordinates y x Initial locationat (0, 0) withx- and y-axesaligned

6. 2D Modeling Transformations Modeling Coordinates y x Scale .3, .3 Rotate -90 Translate 5, 3

7. 2D Modeling Transformations Modeling Coordinates y x Scale .3, .3 Rotate -90 Translate 5, 3

8. 2D Modeling Transformations Modeling Coordinates y x Scale .3, .3 Rotate -90 Translate 5, 3 World Coordinates

9. 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

10. 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

11. Scalar Multiplication • To multiply a martix A by a scalar value s, we multiply each element amn by the scalar • Ex. , find 3A = ?

12. 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 = ?

13. Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1

14. Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1

15. Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1

16. Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1

17. Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1

18. Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1

19. Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1

20. Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1

21. Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1

22. Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1

23. Matrix Multiplication 1x3 3x1 1x1 2x2 2x2 2x2 3x3 3x1 3x1

24. Warning!!! • but (AB)C = A(BC) • A(B+C) = AB + AC • (A+B)C = AC + BC • (AB)T = BTAT • A(sB) = sAB

25. Determinant of a Matrix

26. Matrix Inverse