Figure 2 Rotation — A rotation pins the lower right-hand corner pixel of an image array and moves the image array about that pixel clockwise 90 degrees.

Input Image Array

     1 2 3
     4 5 6
     7 8 9

Rotate # 1  Rotate # 2  Rotate # 3

   7 4 1       9 8 7       3 6 9
   8 5 2       6 5 4       2 5 8
   9 6 3       3 2 1       1 4 7