2.7 Exercises

23 points · 4 extra credit

Applications to Computer Graphics

Throughout, a point (x,y)(x, y) in the plane is represented in homogeneous coordinates by the column [xy1]\begin{bmatrix} x \\ y \\ 1 \end{bmatrix}, and a 22D transformation is applied by left-multiplying by a 3×33\times3 matrix.

  1. 1. (3 pts) Write the 3×33\times3 homogeneous matrix for the translation by (4,−1)(4, -1), and use it to find the image of the point (2,3)(2, 3).

    #
  2. 2. (3 pts) Write the 3×33\times3 homogeneous matrix RR for a 90∘90^\circ counterclockwise rotation about the origin, and compute the images of (1,0)(1, 0) and of a general point (x,y)(x, y).

    #
  3. 3. (3 pts) A figure is first rotated 90∘90^\circ counterclockwise about the origin, then translated by (4,−1)(4, -1). Write the single 3×33\times3 matrix for this composite transformation, apply it to (1,0)(1, 0), and explain why performing the translation first would generally give a different result.

    #
  4. 4. (2 pts) Write the homogeneous matrix for the scaling that multiplies xx-coordinates by 22 and yy-coordinates by 33, and find the image of (1,1)(1, 1).

    #
  5. 5. (3 pts) The shear (x,y)↦(x+2y, y)(x, y) \mapsto (x + 2y,\, y) is a signature computer-graphics operation. Write its 3×33\times3 homogeneous matrix HH, and apply it to the four vertices (0,0)(0, 0), (1,0)(1, 0), (1,1)(1, 1), (0,1)(0, 1) of the unit square. Then, using matrix composition, write the single matrix for this shear followed by a 90∘90^\circ counterclockwise rotation about the origin, and use it to find the image of (1,1)(1, 1).

    #
  6. 6. (3 pts) State whether each is true or false, and justify.

    (a) Every 22D rotation, scaling, and translation can be represented by a single 3×33\times3 matrix acting on homogeneous coordinates.

    (b) The homogeneous coordinate of an ordinary point of the plane is always 11 in the third entry.

    (c) Composing two transformations corresponds to multiplying their matrices, and matrix order does not matter because both are rigid motions.

    #
  7. 7. (3 pts) Explain why a nonzero translation of R2\mathbb{R}^2 is not a linear transformation of R2\mathbb{R}^2, and explain how homogeneous coordinates let it be represented by a matrix product anyway.

    #
  8. 8. (3 pts) In 33D graphics a point (x,y,z)(x, y, z) is written as [xyz1]\begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix}. Write the 4×44\times4 matrix for a 90∘90^\circ counterclockwise rotation about the zz-axis, and compute the image of (1,0,5)(1, 0, 5).

    #
  9. 9. (4 pts ••) Derive the 3×33\times3 homogeneous matrix for a 180∘180^\circ rotation about the point (1,1)(1, 1) (not the origin), by composing a translation to the origin, a rotation, and a translation back. Then apply it to the point (3,2)(3, 2).

    #