The Affine Group of Transformations

The Affine Group of Transformations

The Affine Group of Transformations Kenneth H. Carpenter Department of Electrical and Computer Engineering Kansas State University February 26, 1997 (revised September 20, 2001) 1 Introduction The affine group is a set of transformations in space that leave straight lines as straight lines. (These can be thought of as transformations of the coordinate system, leaving the objects unchanged, or as transformations of the objects, leaving the coordinate system unchanged. We shall take the latter viewpoint, since it is the one most closely associated with computer graphics.) Since one such transformation followed by another results in straight lines going to straight lines going to straight lines, the result of two affine transformations in succession is a third affine transformation. Further, one can reverse any such transformation, to get back to the original lines, so each affine transformation has an inverse transformation. This is all that is required to form a group in mathematics: • set of objects: the transformations themselves • equivalence relation: two transformations are equivalent if they each transform any specific line into the same new line • operation: performing first one transformation then another yields a third • satisfies the group postulates: If a, b, c,... are group members and is the operation, then 1. Closure: a b = c (result of operation is in the set - true for affine transformations) 2. Identity: There is an element i such that a i = a for all a (the identity transformation is to do nothing!) 3. Inverses: For every a there must be a b such that a b = i (true for affine transformations - just reverse what was done) 4. Associativity: a (b c) = (a b) c (This is not as obvious, but will be shown later to be true for affine transformations.) Since affine transformations form a group, group theory shows that there exist matrix representations for the group – that is, there is a group of matrices that follows the same rules as the group, with the matrices being the group members, and the operation being matrix multiplication. We will find and use one or more of these representations. 2 The analytic geometry of affine transformations Let the usual notation of x, y, z for the rectangular coordinates of points in three-dimensional space be replaced by x1, x2, x3. Then we can refer to a general coordinate as xi where i = 1, 2, or 3. (Note that x3 does not mean x cubed any more! When we want powers of the xi we have to use parentheses like this: (x2)3.) 1 Affine Transformations - K. H. Carpenter - 20SEP01 2 A general transformation of the points of an object replaces the xi representing a point in space with a new set yi related to the original by three functions of three variables: yi = f i(x j). (1) We now inquire what restrictions must be placed on these functions for the transformations to be affine. But first we must find a way to represent a straight line. 2.1 Straight lines in parametric form The simplest way to represent a curve in multiple dimensions is by a set of parametric equations, one for each dimension: xi = gi(t), (2) where t is the parameter. Now we can take the differential of eq.(2) to obtain dxi = (dgi/dt)dt. For the curve to be a straight line the ratios dxi/dx j must be the same for all t. This will be true if each dgi/dt is a constant for all t. Hence one way we can express the parametric functions of any straight line is xi = gi(t) = αit + βi. (3) 2.2 Affine transformations in terms of parametric straight lines Since the result of affine transforming a straight line must be another straight line, and since any straight line can be written in the form of eq.(3), the functions of the transformation must yield f i(α jt + β j) = γit + δi. (4) Since d f i/dt = γi, f i can contain only first powers of t, and hence only first powers of the x j. We can thus write i i j X i j i X i j j i y = f (x ) = (r j x ) + s = [r j(α t + β )] + s . (5) j j i i where the r j and the s are the constants that specify the transformation. i The r j values are not entirely arbitrary. Since the inverse transformation must exist (for the affine transfor- i mations to form a group), the matrix of the r j’s must have an inverse, hence its determinant must be non-zero. 2.3 Affine transformations retain parallel properties As a corollary to affine transformations being linear, parallel lines subject to the same transformation, remain parallel, and lines that are not parallel before transformation are not parallel after. Parallel lines in the parametric form of eq.(3) have the same αi values but different βi values. From eq.(5) and eq.(4) it can be seen that two parallel lines, after the same transformation, will have the same γi values but different δi values and hence be parallel. The proof of the converse is left as an exercise for the reader. Affine Transformations - K. H. Carpenter - 20SEP01 3 3 The group operation – successive transformations 3.1 From the viewpoint of analytic geometry The constants in eq.(5) represent rotations and translations along with possible scaling and reflection. These i i operations are illustrated in chapter 4 of the text by Angel[1]. Let ra j and sa represent the r and s constants for the a transformation; similarly define the constants for the b transformation. Then successive transformations yields a new transformation c where the constants of c are given by i X i k rc j = rbkra j (6) k i X i k i sc = ( rbk sa) + sb. (7) k This can be recognized as the component form of matrix multiplication between rotation matrices Rb and Ra along with translation vectors S a and S b. In general, the R matrix contains scale factors, inversions, and shears, as well as rotations. When a transfor- mation is a pure rotation, then S = 0 and the inverse of R is its transpose. When scaling occurs the determinant of R has a magnitude other than one, and when reflection occurs the determinant of R is negative. 3.2 From the viewpoint of a matrix representation of the group The two sets of constants that make up the R matrix and S vector for a transformation may be combined into a single square matrix T as R | S T = . (8) 0 | 1 The vector S is appended on the right to the matrix R and a fourth row is made up of “zeros” and a single “one” at the lower right. Now Tc = TbTa, and matrix multiplication is isomorphic to successive transformations, with the first transformation being on the right in the product. Since matrix multiplication is associative, we see that the requirement for associativity of the transforma- tions is met. 4 Homogeneous coordinates With the transformation matrix defined as the T of eq.(8), it is possible to express the change of coordinates on transformation by a single matrix multiplication, if the vector of coordinates is extended to be the four- dimensional X: wx1 wx2 X = , (9) wx3 w where w is any non-zero constant. An obvious choice is w = 1. With such a definition for X and a similar one for the vector Y that results from a transformation, we have Y = TX. Affine Transformations - K. H. Carpenter - 20SEP01 4 5 Primitive transformations Any transformation may be expressed by a product of simpler, primitive transformations. The choice of prim- itive transformations is somewhat arbitrary. In three dimensions, one can show that any rotation is the product of three rotations. Translations can always be separated from rotations. For more general situations, involv- ing scaling and shearing, the choice of primitives is not so simple. In the following it will be shown that any two-dimensional R can be replaced by a sequence of two-dimensional rotations and scalings. 5.1 Repeated transformations leave the R part a product of R parts From eq.(8), one sees the separation of a general transformation matrix into a translation part S and a general- ized rotation part R. If one multiplies together two such matrices, the R part of the product will be the product of the R parts of the two being multiplied. This continues for any number of transformations. The R parts affect the S parts applied earlier, but the S parts have no effect on the final R part. Thus any transformation could have all its primitives consist of R parts only, except for the last one applied. 5.2 Case of shear For a shear primitive, the transformation has a zero S part and a R part that is the identity matrix with one non- diagonal element replaced by a non-zero value. Since shear is inherently two-dimensional, let us consider only a two-by-two matrix of shear and how it may be broken into other two-by-two matrices representing rotations and scalings. The general form of a two-dimensional rotation matrix is " # cos θ − sin θ U(θ) = . (10) sin θ cos θ The general form of a shear along x is " # 1 h W = . (11) 0 1 The general form of a scaling is " # a 0 K = . (12) 0 b By multiplying out and forming four scalar equations, one can show that it is not possible to find θ1, θ2, a, and b such that W = U(θ1)KU(θ2).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    5 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us