Linear Transformations, Animations, GIF files
MATH 210-01, Fall 2021
Ryan Pellico, Department of Mathematics, Trinity College
In class we saw how special matrices may be used as linear transformations of the xy plane to
achieve certain simple animations. Together with the gif_template.m file, we can turn these anima-
tions into .gif files.
• Scaling by a factor ↵:

↵ 0
0 ↵
� 
x
y
�
• Shear by � in x:

1 �
0 1
� 
x
y
�
• Reflect about the y axis:

�1 0
0 1
� 
x
y
�
• Reflect about the x axis:

1 0
0 �1
� 
x
y
�
• CCW rotation by and angle ✓:

cos(✓) � sin(✓)
sin(✓) cos(✓)
� 
x
y
�
https:
en.wikipedia.org/wiki/Transformation_matrix
1. (10 points) Make a personalized shape/design using the techniques used to make the “ugly
smiley face". Bonus point will be awarded to the five most to my liking.
2. (10 points) Make a .gif file with 50 frames called changing_scale.gif where your shape oscil-
lates between 0.5 and 1.5 times its original scale. Remember that gif_template.m creates a gif
that will loop, so you only need to go from 0.5 scale to 1.5 and back to 0.5 one time.
3. (10 points) Make a .gif file with 50 frames called CW_rotate.gif where your shape rotates
clockwise one time.
Teeebaeeesoeseeeseesesesreoseeeestseeeeesseesasesessee