Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Graphics CSE 581 – Interactive Computer Graphics Mathematics for Computer Graphics CSE 581 – Roger Crawfis (slides developed from Korea University slides)"— Presentation transcript:

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

2 CSE 581 – Interactive Computer Graphics Spaces Scalars (Linear) Vector Space Scalars and vectors Affine Space Scalars, vectors, and points Euclidean Space Scalars, vectors, points Concept of distance Projections

3 CSE 581 – Interactive Computer Graphics Scalars (1/2) Scalar Field Scalar Field Ex) Ordinary real numbers and operations on them Two Fundamental Operations Addition and multiplication Associative Commutative Distributive

4 CSE 581 – Interactive Computer Graphics Scalars (2/2) Two Special Scalars Additive identity: 0, multiplicative identity: 1 Additive inverse and multiplicative inverse of

5 CSE 581 – Interactive Computer Graphics Vector Spaces (1/4) ScalarsVectors Two Entities: Scalars and Vectors Vectors Directed line segments n -tuples of numbers Two operations: vector-vector addition, scalar- vector multiplication Zero Vector Special Vector: Zero Vector Let u denote a vector Directed line segments

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

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

8 CSE 581 – Interactive Computer Graphics Vector Spaces (4/4) Dimension Dimension The greatest number of linearly independent vectors Basis Basis n linearly independent vectors ( n : dimension) Representation Unique expression in terms of the basis vectors Change of Basis: Matrix M Other basis 

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

10 CSE 581 – Interactive Computer Graphics Affine Spaces (2/2) Points Third Type of Entity: Points Point-Point Subtraction New Operation: Point-Point Subtraction P and Q : any two points  vector-point addition Frame 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 CSE 581 – Interactive Computer Graphics Euclidean Spaces (1/2) No Concept of How Far Apart Two Points in Affine Spaces!! Inner (dot) Product New Operation: Inner (dot) Product Combine two vectors to form a real α, β, γ, …: scalars, u, v, w, …:vectors Orthogonal:

12 CSE 581 – Interactive Computer Graphics 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 CSE 581 – Interactive Computer Graphics 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 CSE 581 – Interactive Computer Graphics Matrices Definitions Matrix Operations Row and Column Matrices Rank Change of Representation Cross Product

15 CSE 581 – Interactive Computer Graphics 6.837 Linear Algebra Review What is a Matrix? A matrix is a set of elements, organized into rows and columns rows columns

16 CSE 581 – Interactive Computer Graphics 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 CSE 581 – Interactive Computer Graphics 6.837 Linear Algebra Review Basic Operations Addition, Subtraction, Multiplication Just add elements Just subtract elements Multiply each row by each column

18 CSE 581 – Interactive Computer Graphics Matrix Operations (1/2) Scalar-Matrix Multiplication Scalar-Matrix Multiplication Matrix-Matrix Addition Matrix-Matrix Addition Matrix-Matrix Multiplication Matrix-Matrix Multiplication A : n x l matrix, B : l x m  C : n x m matrix

19 CSE 581 – Interactive Computer Graphics Matrix Operations (2/2) Properties of Scalar-Matrix Multiplication Properties of Matrix-Matrix Addition Commutative: Associative: Properties of Matrix-Matrix Multiplication Identity Matrix Identity Matrix I (Square Matrix)

20 CSE 581 – Interactive Computer Graphics 6.837 Linear Algebra Review Multiplication Is AB = BA? Maybe, but maybe not! Heads up: multiplication is NOT commutative!

21 CSE 581 – Interactive Computer Graphics Row and Column Matrices Column Matrix p T : row matrix Concatenations Concatenations Associative By Row Matrix

22 CSE 581 – Interactive Computer Graphics 6.837 Linear Algebra Review Vector Operations Vector: 1 x N matrix Interpretation: a line in N dimensional space Dot Product, Cross Product, and Magnitude defined on vectors only x y v

23 CSE 581 – Interactive Computer Graphics 6.837 Linear Algebra Review 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’

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

25 CSE 581 – Interactive Computer Graphics 6.837 Linear Algebra Review 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

26 CSE 581 – Interactive Computer Graphics 6.837 Linear Algebra Review 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”

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

28 CSE 581 – Interactive Computer Graphics 6.837 Linear Algebra Review 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

29 CSE 581 – Interactive Computer Graphics 6.837 Linear Algebra Review Determinant of a Matrix Sum from left to right Subtract from right to left Note: N! terms

30 CSE 581 – Interactive Computer Graphics 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

31 CSE 581 – Interactive Computer Graphics Change of Representation (2/2) : n x n matrix and By direct substitution or

32 CSE 581 – Interactive Computer Graphics 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


Download ppt "Graphics CSE 581 – Interactive Computer Graphics Mathematics for Computer Graphics CSE 581 – Roger Crawfis (slides developed from Korea University slides)"

Similar presentations


Ads by Google