Download presentation
Presentation is loading. Please wait.
Published byRoss King Modified over 9 years ago
1
1 Graphics CSCI 343, Fall 2015 Lecture 10 Coordinate Transformations
2
2 Matrices A Matrix is a rectangular array of quantities: 2x2 Matrix 2x3 Matrix 3x1 Matrix mxn Matrix
3
3 Matrix multiplication To multiply two matrices, multiply the rows in the first matrix by the columns of the second matrix. Example:
4
4 Matrix multiplication In general:
5
5 Practice a) b)
6
6 Representing systems of equations A system of equations, e.g. can be represented with a matrix equation:
7
7 Matrix terminology 1. The transpose of a matrix, exchanges the rows and columns of that matrix. 2. When a matrix, A, is multiplied by the identity matrix, the result is the same matrix A. 3. The a matrix, A, is multiplied by its inverse, A -1, the result is the identity matrix. AI = A AA -1 = I
8
8 Recall Coordinate systems Coordinate systems are represented by a set of basis vectors (v 1, v 2, v 3 ) and a reference point, P 0. Points can be written as: v1v1 v2v2 v3v3 P P0P0 Vectors can be written as:
9
9 Changing the basis set We can move from basis (v 1, v 2, v 3 ) to basis (u 1, u 2, u 3 ) using the following set of equations: v1v1 v2v2 v3v3 u1u1 u2u2 u3u3 In matrix form: u = Mv
10
10 Representing a vector in the new basis set Suppose: We would like to find b, such that:
11
11 Solving for b We will solve for b in class
12
12 Homogeneous coordinates Transformation of basis vectors leaves the origin unchanged. Homogeneous coordinates allow us to transform the origin. Recall representation of a point: To represent P with matrices, we add a 4th dimension so we can include position: P is represented by: For vectors, the fourth coordinate is zero.
13
13 Changing frames in homogeneous coordinates Changing from (v 1, v 2, v 3, P 0 ) to (u 1, u 2, u 3, Q 0 ): v1v1 v2v2 v3v3 u1u1 u2u2 u3u3 P0P0 Q0Q0 In matrix form:
14
14 Transforming a point between coordinate systems Suppose P is represented by b in the u, Q 0 space and by a in the v, P 0 space. (b T = [ 1, 2, 3, 1], a T = [ 1, 2, 3, 1]) We will solve for b in class.
15
15 Affine transformations Affine transformations are linear transformations from a point in one frame to another frame: f( p + q) = f(p) + f(q) , are scalars; p, q are vertices. Affine transformations preserve lines. We can represent the transformation as: v = Auwhere
16
16 Translation Translation: Displace points by a fixed distance in a given direction. d x' = x + x y' = y + y z' = z + z p' = Tp where Equations: In matrix form:
17
17 Inverse translation T is the translation matrix Inverse translation: Displace by -d
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.