1 / 32

Mathematics for Computer Graphics

Mathematics for Computer Graphics. CSE 581 – Roger Crawfis (slides developed from Korea University slides). Spaces. Scalars (Linear) Vector Space Scalars and vectors Affine Space Scalars, vectors, and points Euclidean Space Scalars, vectors, points Concept of distance Projections.

paul2
Download Presentation

Mathematics for Computer Graphics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mathematics for Computer Graphics CSE 581 – Roger Crawfis (slides developed from Korea University slides)

  2. Spaces • Scalars • (Linear) Vector Space • Scalars and vectors • Affine Space • Scalars, vectors, and points • Euclidean Space • Scalars, vectors, points • Concept of distance • Projections

  3. Scalars (1/2) • Scalar Field • Ex) Ordinary real numbers and operations on them • Two Fundamental Operations • Addition and multiplication Commutative Associative Distributive

  4. Scalars (2/2) • Two Special Scalars • Additive identity: 0, multiplicative identity: 1 • Additive inverse and multiplicative inverse of

  5. Vector Spaces (1/4) • Two Entities: Scalars and Vectors • Vectors • Directed line segments • n-tuples of numbers • Two operations: vector-vector addition, scalar-vector multiplication • Special Vector: Zero Vector • Let u denote a vector Directed line segments

  6. Vector Spaces (2/4) • Scalar-Vector Multiplication • u and v: vectors, α and β: scalars • Vector-Vector Addition • Head-to-tail axiom: to visualize easily Scalar-vector multi. Head-to-tail axiom

  7. Vectors are linear independent if the only set of scalars is Vector Spaces (3/4) • Vectors = n-tuples • Vector-vector addition • Scalar-vector multiplication • Vector space: • Linear Independence • Linear combination:

  8. Vector Spaces (4/4) • Dimension • The greatest number of linearly independent vectors • Basis • n linearly independent vectors (n: dimension) • Representation • Unique expression in terms of the basis vectors • Change of Basis: Matrix M • Other basis 

  9. Affine Spaces (1/2) • No Geometric Concept in Vector Space!! • Ex) location and distance • Vectors: magnitude and direction, no position • Coordinate System • Origin: a particular reference point Identical vectors Basis vectors located at the origin Arbitrary placement of basis vectors

  10. Affine Spaces (2/2) • Third Type of Entity: Points • New Operation: Point-Point Subtraction • P and Q : any two points  vector-point addition • Frame: a Point and a Set of Vectors • Representations of the vector and point: n scalars Head-to-tail axiom for points Vector Point

  11. Euclidean Spaces (1/2) • No Concept of How Far Apart Two Points in Affine Spaces!! • New Operation: Inner (dot) Product • Combine two vectors to form a real • α, β, γ, …: scalars, u, v, w, …:vectors • Orthogonal:

  12. Euclidean Spaces (2/2) • Magnitude (length) of a vector • Distance between two points • Measure of the angle between two vectors • cosθ = 0  orthogonal • cosθ = 1  parallel

  13. Projections • Problem of Finding the Shortest Distance from a Point to a Line of Plane • Given Two Vectors, • Divide one into two parts: one parallel and one orthogonal to the other Projection of one vector onto another

  14. Matrices • Definitions • Matrix Operations • Row and Column Matrices • Rank • Change of Representation • Cross Product

  15. 6.837 Linear Algebra Review What is a Matrix? • A matrix is a set of elements, organized into rows and columns rows columns

  16. Definitions • n x m Array of Scalars (n Rows and m Columns) • n: row dimension of a matrix, m: column dimension • m = n square matrix of dimension n • Element • Transpose: interchanging the rows and columns of a matrix • Column Matrices and Row Matrices • Column matrix (n x 1 matrix): • Row matrix (1 x n matrix):

  17. Basic Operations • Addition, Subtraction, Multiplication Just add elements Just subtract elements Multiply each row by each column 6.837 Linear Algebra Review

  18. Matrix Operations (1/2) • Scalar-Matrix Multiplication • Matrix-Matrix Addition • Matrix-Matrix Multiplication • A: n x l matrix, B: l x m C: n x m matrix

  19. Matrix Operations (2/2) • Properties of Scalar-Matrix Multiplication • Properties of Matrix-Matrix Addition • Commutative: • Associative: • Properties of Matrix-Matrix Multiplication • Identity MatrixI (Square Matrix)

  20. Multiplication • Is AB = BA? Maybe, but maybe not! • Heads up: multiplication is NOT commutative! 6.837 Linear Algebra Review

  21. Row and Column Matrices • Column Matrix • pT: row matrix • Concatenations • Associative • By Row Matrix

  22. Vector Operations • Vector: 1 x N matrix • Interpretation: a line in N dimensional space • Dot Product, Cross Product, and Magnitude defined on vectors only y v x 6.837 Linear Algebra Review

  23. Vector Interpretation • Think of a vector as a line in 2D or 3D • Think of a matrix as a transformation on a line or set of lines V V’ 6.837 Linear Algebra Review

  24. 6.837 Linear Algebra Review Vectors: Dot Product • Interpretation: the dot product measures to what degree two vectors are aligned A A+B = C (use the head-to-tail method to combine vectors) B C B A

  25. Vectors: Dot Product Think of the dot product as a matrix multiplication The magnitude is the dot product of a vector with itself The dot product is also related to the angle between the two vectors – but it doesn’t tell us the angle 6.837 Linear Algebra Review

  26. Vectors: Cross Product • The cross product of vectors A and B is a vector C which is perpendicular to A and B • The magnitude of C is proportional to the cosine of the angle between A and B • The direction of C follows the right hand rule – this why we call it a “right-handed coordinate system” 6.837 Linear Algebra Review

  27. Inverse of a Matrix • Identity matrix: AI = A • Some matrices have an inverse, such that:AA-1 = I • Inversion is tricky:(ABC)-1 = C-1B-1A-1 Derived from non-commutativity property 6.837 Linear Algebra Review

  28. Determinant of a Matrix • Used for inversion • If det(A) = 0, then A has no inverse • Can be found using factorials, pivots, and cofactors! • Lots of interpretations – for more info, take 18.06 6.837 Linear Algebra Review

  29. 6.837 Linear Algebra Review Determinant of a Matrix Sum from left to right Subtract from right to left Note: N! terms

  30. Change of Representation (1/2) • Matrix Representation of the Change between the Two Bases • Ex) two bases and • Representations of v • Expression of in the basis or or

  31. Change of Representation (2/2) • : n x n matrix • and • By direct substitution or

  32. Cross Product • In 3D Space, a unit Vector, w, is Orthogonal to Given Two Nonparallel Vectors, u and v • Definition • Consistent Orientation • Ex) x-axis x y-axis = z-axis

More Related