Pin it!
Google Plus

Computer Animation

  • Lesson
9-12
1
Number and OperationsGeometry
Craig Russell
Mahomet, IL

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.

This lesson might be previewed at the close of the previous day’s lesson by showing an image, such as one found on the Computer Animation Overhead, and asking students to draw a simple image on a grid for homework. Student images should be fairly simple with 8–10 key points and without symmetry (so effects of reflection and rotation will be easier to detect).

1110 overhead Computer Animation Overhead 

Introduce the lesson with a classroom discussion of cartoon animation. Some possible question prompts are:

  • How were the earliest cartoons animated by hand?
    [The first cartoons were produced by drawing thousands of cels, which are transparent drawing sheets. Many would have the same background but with very slight changes to the main characters. When strung together in rapid succession, the illusion of motion was achieved.]
  • How could computers take over some of the burden of animating by hand?
    [The earliest introduction of technology into the animation process involved simplifying the background scene production. In the last twenty years, film studios developed techniques for shaping the characters to give 3D effects and transforming images to give the effect of motion. In effect, the computer has taken over the time-consuming work of creating thousands of incrementally-changed cels. In order to have computers do this work, artists and computer programmers had to analyze the components of motion and describe the components in a way the computer could work with. The transformation process will be explored in this lesson.]
  • Can you name some computer-animated films?
    [Answers will vary. Some computer-animated films are Toy Story, Antz, Finding Nemo, Cars, Kung Fu Panda, and Up.]
  • What are the components of motion? How are they related to geometric transformations?
    [The language of geometric transformations includes translation, rotation, reflection, and dilation. It provides a concise way to express the basic components of motion.]

Divide the class into groups of 3 or 4 students who will work together. The groups allow for more computation by the group as a whole. If you need to use larger groups, you might want to add additional transformation matrices to Question 2. Each group member should compute a different matrix product in Question 2. Give each group the Computer Animation Activity Sheet, several quarter sheets of graph paper.

pdficon Computer Animation Activity Sheet 

Assign each group an image. All members of a single group should work on the same image. You may:

  • Use the overhead projector to project a single image from the Computer Animation Overhead for all groups.
  • Print out images from the overhead and allow groups to choose one.

    OR

  • Allow student to pick one of the images created for homework to use with the activity. Check images before students begin working to ensure they meet the criteria previous stated.

Students should work together in their groups to complete Question 1 on the activity sheet, so that each student in the group has a clear idea of how the image can be represented in a matrix. Students will probably find it helpful to label the points on their image and the columns of their matrix with the same labels (A, B, C, etc.). Groups may want to work together, as well, on the first transformation in Question 2a, plotting the points on graph paper and connecting the dots in the same way as in the original image. Allow them to do so as long as enough transformations remain to allow each student to work on one individually. You can either allow them to choose their own transformation or assign them to students based on their person strengths. The Computer Animation Answer Key gives the solutions for the runner image only, but can be used as a guide as you help students.

pdficon Computer Animation Answer Key 

Students may struggle with translating their matrix product back into an image. If they haven't already done so, you might encourage them to label the columns in their matrix and label the points in their image. Students can use the original skeleton as a guide, much like a connect-the-dots drawing.

Encourage students to write out the product carefully on scratch paper so that they can be certain about their computations. Alternatively, you might allow students to use a graphing calculator or CAS to compute the matrix products. Using graphing calculators will allow more time to discuss results in a class where students have previously demonstrated proficiency with matrix multiplication.

Question 2c involves fractions, which some students will find intimidating. They may prefer to use decimals, or even ignore the denominators (using 3 and ±4 instead of 3/5 and ±4/5), replacing it at the end of their calculation. Allow them to work with the numbers in whatever form they are most comfortable.

Question 2d results in a reflection over the line y = x. You may need to offer students some coaching, as some will think the transformation is a 90° counter-clockwise rotation. You might point out, in the student image, that the orientation of the image has been reversed, so that the image must be a reflection rather than a rotation). If students' misunderstandings persist, assign them to compute and graph their images with the transformation matrix 3141 matrix, which does result in the 90° counter-clockwise rotation.

Once all the products have been computed and images graphed for Question 2, groups should discuss what kind of geometric transformation resulted, and then write geometric descriptions under their products on the activity sheet. Note that while the matrices and images in the answer key are only for the runner image, the geometric descriptions will be the same for all images. For example, the result for Question 2a is a reflection over the y-axis, regardless of the image used.

When groups have finished their discussion of Question  have them go on to answer and discuss Questions 3 through 5 in their groups, as well, allowing time for other groups to complete their discussions of Question 2. Once all groups have finished with Question 2, have different groups present their geometric descriptions of the transformations resulting from each product. The class as a whole may offer suggestions for improved language.

After concluding the presentations, allow groups to continue working until they finish the activity sheet. Questions 6 and 7 provide an introduction to more advanced transformations, allowing students to see how translation can result from matrix multiplication. All students in the group should agree on the matrix representation in Question 6, but they should split the work and have each individual in the group complete a different product in Question 7.

As a summary discussion, invite students to share something they learned as a result of this lesson. Be sure to highlight Questions 3 and 5, since they address the way matrix multiplication works and introduce the function of the identity matrix in transformations, respectively.

 

Assessments 

  1. Have groups put their answers to Question 2 and 7 on posterboard. Check that each group’s sketches show the correct transformations.
  2. 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.
  3. 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 

  1. 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.
  2. Students who have studied trigonometry may wish to try transformations of the form 3141 trig matrix to obtain counter-clockwise rotations by angle a, and might experiment with transformations of the form 3141 rot matrix in order to rotate around points other than the origin.
  3. 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.
  4. 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?
  5. 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 3141 extmatrix will transform the point (1,0) onto (a,b), and the point (0,1) onto (c,d).
 

Questions for Students 

1. 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 3141 ID matrix, where I is the identity matrix and r is the scale factor]

2. 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.]

3. 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.]

4. 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 3141 frac 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.]

5. 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.]

6. 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.]

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?
 

Learning Objectives

Students will:

  • Apply matrix multiplication skills
  • Explore connections between geometric transformations and matrix multiplication
  • Discover the 2×2 identity matrix

Common Core State Standards – Practice

  • CCSS.Math.Practice.MP5
    Use appropriate tools strategically.
  • CCSS.Math.Practice.MP7
    Look for and make use of structure.