Wednesday, November 01, 2006

What's going on in a recursive picture?

1. Start with an image showing the frame you want to use for your Escher "Print Gallery" photograph. The highest the resolution, the better.

2. Rotate and crop the source image so that the center frame is dead in the center, and the aspect ratio of the whole image is the same as the center frame. Also, now may be a good time to correct any problem in the source image, check levels and sharpen a bit, especially the center (where the "blowing out" will be highest).

3. This step is where the mathmap magic starts to come in. By using a complex logarithm on the pixels, the image is "unrolled" around the center.
4. The previous image is cut and pasted several times, so that the whole canvas is covered.

5. This step undoes what was done in Step 3. This is done by "rolling up" the image in Step 4 by using the inverse of the complex logarithm, i.e. the complex exponential.

You might have said, why bother? I could have easily gimped the source image to get this. And you would be right. But there is more to it...

6. If you rotate the image produced by Step 4 a bit, and then roll it up as in Step 5, you get this image. Voilą!