I remember a maths teacher saying to me, "It's amazing how clear it is, when you use Logo, that a circle is just a polygon with an infinite amount of sides"

In that spirit, here's a simple formula for a polygon.

Repeat {sides}: Forward {length}, Right Turn 360/{sides}.

I tried running this program with an infinite number of sides. It fell over in less than a minute and I never did see a circle.

As the number of sides goes from 3 up to 39, we see the shape becoming more and more circle-like.

No logo-based investigation of the polygon is complete without discussing the polypoly. This is the shape created when a polygon with X sides is drawn, but where each side is a polygon with Y sides.

And here is its companion set — with polygons on the outside of each line, instead of the inside —

This line of thinking quickly takes you in the direction of asking: "What if each side of the polygon was itself a polygon, including the sides of the polygons within the polygons.... etc." which ends up with a rendition of the Sierpinski Polygon, or N-Flake as it is sometimes known.

See Also


Logo + Turtle graphics via Papert (via archive.org)