How many times have you seen something on the internet that you’ve wanted to try for yourself? [Warning. Do not try this at home. Professional stunt driver on closed course. May result in the medical condition known as “hot dog fingers.”] For me, it was a post by Jason Davies called From Random Polygon to Ellipse.
Jason created an online applet that demonstrates an interesting mathematical phenomenon. If you start with a polygon defined by a random collection of points and then iteratively create a new polygon from the midpoints of each of the original polygon’s segments, the perimeter shape converges to an ellipse.
Jason ran across this in Davis and Hersh’s The Mathematical Experience in which the authors showed that not only is this transformation provable but that the resulting ellipse is tilted 45 degrees.
The “why” remains a mystery to me. But I had to try the “how” for myself and wrote a script for Pointwise using our Tcl-based Glyph scripting language that does the following.
- Select any domain (surface mesh).
- Create a database curve (geometry) that represents the domain’s perimeter by simply connecting all its grid points.
- Apply Jason’s mid-point replacement technique to make a new perimeter.
- Iteratively repeat.
Sure enough, the perimeter curves become ellipses regardless of how complicated the original perimeter’s shape is. You can see some examples in this video on YouTube.
The graphics in the video show the last 88 iterations on the perimeter with the most recent one being white and the 88th being black. So initially you see the first 88 perimeters accumulating and then see them slowly converge to the final ellipse.
Also note that the perimeter at each iteration is scaled up by the relative size of its bounding box to the original bounding box’s perimeter. Otherwise, the perimeters would shrink to nothing.
What was really fun to see was that if the original perimeter is truly 3D, the final perimeter is a planar ellipse, as shown in the video above at the 2:25 mark.
And hopefully one of you can read the mathematics and describe in layman’s terms what’s going on here.
Special thanks to:
- Jason Davies for posting his original work online.
- Pat Baker for improving my script for publication.
- Travis Carrigan for making the video.