To view this content, you need to install Java from java.com

I've been writing this applet over and over since I first wrote it on an Apple II+ in the early 80s. The idea is to start with a random polygon, then replace the polygon by the polygon you get by connecting the midpoints of the sides of the polygon, then repeat.

The polygon quickly gets smaller and smaller, so here it is automatically scaled up so that it is always touching all four sides of a bounding box.

In this applet, the polygon has 1000 sides (a kilogon). The applet doesn't draw every iteration: in between the draws there are quite a few applications of the midpoint algorithm. If this wasn't done, the progression would be very slow: even here, you can see that it slows down rather rapidly.

The ultimate result always seems to be an ellipse (or rather, an extremely good and continually improving approximation of an ellipse). How to prove that? Hmmm...

Reload for a new start.

Source code: midpoints01     Built with Processing

Doctor Matt >> Graphics