In this lab, we wrote a
program that rotates a picture clockwise, counter-clockwise, then one
that rotates it clockwise based on vertical reflections and a
counter-clockwise rotation. To do this, we essentially had to tell JES
to make a new picture, with the width for the height, and the height
for the width, and then translate pixels from one picture to the other,
in the appropriate new location.
To demonstrate these rotations, I present to you the world's ugliest
dog (of 2006).
This guy is pretty adorable when oriented in the correct way. How will
he look rotated clockwise?
How about counter-clockwise?
Finally, we made a clockwise rotation using a vertical reflection,
followed by a counter-clockwise rotation, and then another vertical
reflection. It sounds tedious, but having already written programs to
do these rotations, it only took many fewer lines of code. The picture
looks exactly alike to the picture created by simply rotating it.
Return
to John's course page