Thursday, November 23, 2006

Tiling & Recursion

Still playing around with Canvas (1, 2). Each endeavor needs some purpose, so here's the question behind today's plaything:

What's the optimal way to recursively tile a circle with rectangles?

Maybe I've somehow managed to look in all the wrong places, but preliminary searches haven't brought me to the answer. This problem has to have been solved 1000 times.

But, anyhow, following is a link to an applet demonstrating my stab at the problem (although I'm not sure it's optimal).

Enter a value to set the number of levels of recursion (1 - 8). The total area of the tiles is returned after each tiling. The perfect answer is, of course, Pi.



Post a Comment

Subscribe to Post Comments [Atom]

<< Home