Illuminations: Computer Animation

# Computer Animation

 In this lesson, students transform images through rotation, reflection, dilation, and translation using matrix multiplication. After digitizing images by representing the images as matrices, they multiply image matrices by various transformation matrices, producing transformed images.

### Learning Objectives

 Students will: Apply matrix multiplication skills Explore connections between geometric transformations and matrix multiplication Discover the 2×2 identity matrix

### Materials

 Graph paper (quarter sheets) Graphing calculator or CAS (optional) Computer Animation Activity Sheet Computer Animation Answer Key Computer Animation Overhead (optional)

### Questions for Students

 None of the transformations on the activity sheet are true dilations. What matrix might be used to perform a true dilation? [A matrix of the form , where I is the identity matrix and r is the scale factor] What is an advantage of using the language of geometric transformations to describe motion of objects? [Answers will vary. Possible answers include clarity and conciseness, a pre-existing vocabulary, and ease of translating into computer instruction.] Why do you think the third row and column were necessary in Questions 6 and 7 in order to obtain translations as a result of matrix multiplication? [With a 2×2 transformation matrix, the point (0,0) will always be transformed onto itself, and therefore could never be translated. Adding the row of all 1’s to the image matrix allows a third column on the transformation matrix, which has the effect of adding values to the coordinates.] What kind of geometric transformation will undo the transformation you produced? Can you write down a matrix for that transformation? [Reflections undo themselves, so the matrices from Questions 2a, 2b, and 2d would undo those transformations. Stretches are undone by shrinks (and vice versa), and translations are undone by translations in the opposite direction. Rotations are undone by rotations in the opposite direction (See the Extension below for more details on rotation). The matrix undoes the transformation in Question 2c. It is not possible to undo the collapse-to-a-point or flatten-to-a-line transformations. This question previews the idea of inverse matrices.] What is an advantage of using matrices to encode geometric transformations? [Answers will vary. Possible answers include compact space (Four to nine numbers can be used to describe any transformation) and ease of computation.] What additional challenges are involved in computer animation? [This is very open-ended. Possible answers include moving parts of objects (such as the mouth or limbs of a character), having several images from the same cel move in different ways, filling in digitized images, making motion appear smooth, and making objects appear to be 3D.]

### Assessment Options

 Have groups put their answers to Question 2 and 7 on posterboard. Check that each group’s sketches show the correct transformations. Multiplying two transformation matrices together will make a new transformation that does both of the individual transformations. Ask students to make a matrix that will rotate by 180°, 90° clockwise, or 90° counter-clockwise by combining two of the transformations from the activity. The transformations from Questions 2a and 2b combine to give a 180° rotation. The transformations from Questions 2a and 2d combine to give the 90° rotations, where the direction of the rotation is determined by the order in which the transformation matrices are multiplied. The transformations from Questions 2b and 2d have the same effect. Give students the following coordinates: {(–1,0), (–1,3), (1,0)}. The image will be the fin of a shark swimming to the right. Ask them to choose and apply a transformation from the activity that would cause the shark to reverse directions. The transformation from Question 2a results in the image {(1,0), (1,3), (–1,0)}

### Extensions

 Challenge groups to perform multiple transformations. Ask them to find a transformation matrix that make a shape twice as tall, half as wide, and move it one unit to the left, for example. Students who have studied trigonometry may wish to try transformations of the form to obtain counter-clockwise rotations by angle a, and might experiment with transformations of the form in order to rotate around points other than the origin. Discuss the order of geometric transformations. The order affects the outcome. For example, does reflecting over the line y = x then reflecting over the x-axis result in the same transformation as reflecting over the x-axis then over the line y = x? No, the results are rotated 180°. Students can explore under what circumstances composition of transformations is commutative geometrically. They should discover that matrix products, even of square matrices, are not generally commutative. Students may do research on computer animation. What sort of math is involved in making objects appear to be smooth? What kind of math makes the images appear to be in three dimensions? You might have students explore using arbitrary 2×2 matrices for their transformations. They will quickly discover that the animators have to be careful with their choice of transformation matrix. For example, the matrix will transform the point (1,0) onto (a,b), and the point (0,1) onto (c,d).

### Teacher Reflection

 Did students understand the basics of matrix multiplication? Do students understand how the dimensions of the two matrices in the factors determine the dimensions of the matrix product? Did students discover the role of the zero and identity matrices in multiplication? Did students recall/use the vocabulary of geometric transformations correctly? Were groups successful in sharing the work, or did you have to intervene with suggestions? Was walking around in the classroom, observing student work and asking helping questions an effective teaching approach? Did students notice that graphing images for the matrix transformation provided an error check on their matrix multiplication? That is, were students able to self-correct arithmetic errors result when results created distorted images? Were all students challenged? Did using the extension questions and activities help to reach high achievers? Did you allow students to use graphing calculators or CAS to compute the matrix products, or did they compute the products by hand? Do you think your decision helped or hindered learning?

### NCTM Standards and Expectations

 Geometry 9-12Understand and represent translations, reflections, rotations, and dilations of objects in the plane by using sketches, coordinates, vectors, function notation, and matrices. Number & Operations 9-12Develop an understanding of properties of, and representations for, the addition and multiplication of vectors and matrices.
 This lesson was prepared by Craig Russell as part of the Illuminations Summer Institute.

1 period

### NCTM Resources

 High School Mathematics: Reasoning and Sense Making

 More and Better Mathematics for All Students
 © 2000 National Council of Teachers of Mathematics Use of this Web site constitutes acceptance of the Terms of Use The National Council of Teachers of Mathematics is a public voice of mathematics education, providing vision, leadership, and professional development to support teachers in ensuring mathematics learning of the highest quality for all students. The views expressed or implied, unless otherwise noted, should not be interpreted as official positions of the Council.