Rice COMP 360 - Matrix Representative for Affine and Projective Transformations

Unformatted text preview:

Lecture 13: Matrix Representations for Affine and Projective Transformationsthou shalt set apart unto the LORD all that openeth the matrix Exodus 13:121. Matrix Representations for Affine TransformationsIn the previous lecture we derived formulas for affine and projective transformations using the techniques of vector geometry and vector algebra. Formulas expressed in vector algebra are effective for computing individual transformations, but these formulas are not efficient for composing transformations. Therefore in this lecture we are going to derive matrix representations for each of the classical transformations of Computer Graphics so that we will be able to compose these transformations by matrix multiplication.To fix our notation, denote the origin by O and the three unit vectors along the € x, y,z coordinate axes by € i, j, k. Then in 3-dimensions for any vector v and any point P, there are constants € (v1, v2, v3) and € (p1, p2, p3) such that€ v = v1i + v2j + v3k€ P = O + p1i + p2j + p3k .The constants € (v1, v2, v3) and € (p1, p2, p3) are the rectangular coordinates of v and P, and we often abuse notation and write € v = (v1, v2, v3) and € P = (p1, p2, p3).Now let A be an affine transformation. Then since A preserves linear and affine combinations€ A(v) = v1A( i) + v2A( j) + v3A(k)€ A(P) = A(O) + p1A(i) + p2A( j) + p3A(k) .Thus if we know the value of A on the three vectors € i, j, k and on the single point O, then we know the value of A on every vector v and every point P -- that is, any affine transformation A is completely determined by the four values € A(O), A(i), A( j), A(k).Since affine transformations map points to points and vectors to vectors, there are constants € (aij) such that€ A(i) = a11i + a12j + a13k = (a11, a12, a13)A( j) = a21i + a22j + a23k = (a21, a22, a23)A(k) = a31i + a32j + a33k = (a31, a32, a33)A(O) = O + a41i + a42j + a43k = (a41, a42, a43)Therefore the 12 numbers € (aij) completely characterize the affine transformation A. It seems natural then that we should represent A by a € 4 × 3 matrix and write€ A = A(i)A( j)A(k)A(O)            = a11a12a13a21a22a23a31a32a33a41a42a43            .But there is something not quite right about this € 4 × 3 matrix. If we represent a transformation by a matrix, then we expect that if we multiply the coordinates of a point or a vector by the matrix we should get the result of the transformation applied to the point or vector. However, points and vectors in 3-dimensions have only 3 coordinates, whereas this matrix has 4 rows.To resolve this inconsistency, we shall introduce affine coordinates for points and vectors, and € 4 × 4 matrices to represent affine transformations. Recall that in 2-dimensions we insert a third coordinate, an affine coordinate, for points and vectors: the affine coordinate for points is 1, the affine coordinate for vectors is 0. This affine coordinate allows us to represent affine transformations in the plane by € 3× 3 matrices. We shall follow similar conventions in 3-space; in 3-dimensions we insert a fourth, affine coordinate for points and for vectors. Again the affine coordinate for points is 1, the affine coordinate for vectors is 0. Following this convention,€ A = A(i) 0A( j) 0A(k) 0A(O) 1            = a11a12a130a21a22a230a31a32a330a41a42a431            (1.1).Now for vectors we have€ A(v) = v1A( i) + v2A( j) + v3A(k) = v1,v2,v3,0( )∗A(i) 0A( j) 0A(k) 0A(O) 1            or equivalently€ A(v) = v1,v2,v3,0( )∗a11a12a130a21a22a230a31a32a330a41a42a431            = (v,0)∗ A.Similarly, for points€ A(P) = A(O) + p1A( i) + p2A( j) + p3A(k) = p1, p2, p3,1( )∗A(i) 0A( j) 0A(k) 0A(O) 1            or equivalently2€ A(P) = p1, p2, p3,1( )∗a11a12a130a21a22a230a31a32a330a41a42a431            = (P,1) ∗ A .In this way affine transformations are represented by multiplying the affine coordinates of points and vectors by special € 4 × 4 matrices, where the last column is always € (0,0,0,1)T.2. Linear Transformation Matrices and Translation VectorsTo derive explicit € 4 × 4 matrix representations for all the standard transformations of 3-dimensional Computer Graphics -- translation, rotation, mirror image, uniform and non-uniform scaling, and orthogonal and perspective projection -- we need to convert the corresponding formulas from vector algebra into matrix form.To achieve this goal, notice that the € 4 × 4 matrix representing an affine transformation A always has the following form:€ A =LA0wA1      , (2.1)where € LA is a € 3× 3 matrix and € wA is a 3-dimensional vector. Moreover, for any vector v,€ A(v) = (v,0) ∗LA0wA1      = (v ∗ LA,0). (2.2)Thus the € 3× 3 matrix € LA represents a linear transformation on vectors. Similarly, for any point P,€ A(P) = (P,1) ∗LA0wA1      = (P ∗ LA+ wA,1). (2.3)Thus the vector € wA represents a translation vector. Hence we can decompose A so that€ A = LA0wA1      = 3 × 3 LinearTransformation Matrix 0Translation Vector 1      . (2.4)Our goal is to find explicit expressions for the matrix € LA and the vector € wA for each of the standard affine transformations of 3-dimensional Computer Graphics.2.1 Linear Transformation Matrices. Let us begin with the € 3× 3 matrix € LA. Looking at the formulas for affine transformations from the previous lecture, we see that on vectors these formulas all have following form:€ A(v) = vnew = c1v + c2(v • u)˜ u + c3u × v,where € u,˜ u are fixed unit direction vectors and € c1,c2,c3 are constants. To represent these linear transformation using matrices, we introduce the following three € 3× 3 matrices:3€ I = 1 0 00 1 00 0 1          = 3 × 3 Identity Matrix(2.5)€ uT∗˜ u = u1u2u3        


View Full Document

Rice COMP 360 - Matrix Representative for Affine and Projective Transformations

Documents in this Course
Radiosity

Radiosity

42 pages

Radiosity

Radiosity

22 pages

Load more
Download Matrix Representative for Affine and Projective Transformations
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Matrix Representative for Affine and Projective Transformations and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Matrix Representative for Affine and Projective Transformations 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?