Cat dimension:
Iterate:

This applet is an interactive rendering Arnold's Cat Map. This is a mapping from the unit square in the (x,y) plane to itself according to the following rule: x' = (2x + y) mod 1 and y' = (x + y) mod 1. What this does is stretch the plane out in one direction, squeeze it in another, and then push everything back into the plane by wrapping around the edges (mod 1). This process is shown graphically below. The map is not periodic: no matter how many times you apply the map, the points in the plane will never simultaneously return to their starting positions.

In this applet the cap map is applied to an image of a cat. Pressing one of the iteration buttons will apply the map or its inverse, scrambling up the pixels of the cat. However, since every pixel is sent to another pixel, eventually all the pixels go back to where they started. However, the number of iterations required to see the periodicity varies wildly with the size of the image. For example, the default 124 pixel image repeats after just 15 iterations, but the 125 pixel image takes 250! The map has an infinite number of periodic orbits of all different lengths. In fact, in the original map of the unit square, a point is part of a periodic orbit precisely when both of its coordinates are rational numbers.