My research and investigations

Posts tagged ‘Turtle’

Turtle Geometry 2

In their book (see here), Harold and Andrea begin with a program POLY: steps for a turtle tracing polygons on the plane. A polygon is a closed path: we can see that clearly from outside, but how does a turtle know its path is closed from inside, without measuring its coordinates ? They discuss this in detail, leading to:

  • Closed Path Theorem: the total turning along any closed path in the plane is an integer multiple of 360°. That integer is called the winding number of the closed path.
  • Simple Closed Path Theorem: a simple closed path, which is non-crossing, in the plane has winding number ±1.
  • Whitney-Graustein Theorem: two closed paths in the plane can be deformed into one another if and only if they have the same winding number.

They proved the first, gave a detail sketch of the second, and showed only half of the third — all using elementary topology. As an application of these ideas, they put a stop condition for POLY (so turtle really knows its path is closed), worked out the symmetry of the polygon from the input parameters of POLY, and taught the turtle to escape a fair maze via Pledge algorithm.

Then they let the turtle wander on the sphere, a curved surface that can still be visualized. The turtle will find that Closed Path Theorem breaks down. They showed skillfully how the theorem can be restored, by introducing an intrinsic turning that serves to measeure curvature. The whole discussion makes use of elementary topology of surfaces.

Of course, they let the turtle wander on the torus, the Möbius strip, even Klein’s bottle — leading to this result:

  • Gauss-Bonnet Theorem – for any closed surface, the total curvature K and Euler characteristic χ are related by K = 2πχ.

Eventually they let the turtle wander in Einstein’s curved spacetime – a curved 3D (simplify to 2D space + time) that can only be viewed from inside. It’s amazing that they can talked about differential geometry and Lorentz transform using only diagrams!

For my project, I plan to follow the book’s approach, with the following:

  1. Formalize topology of closed path, hence proving Whitney-Graustein Theorem
  2. Formalize topology of closed surfaces, hence proving Gauss-Bonnet Theorem

Pledge algorithm of solving maze can be formally verified as a result. I am not sure if its recreational use is of any benefit in serious research.

Turtle Geometry

Recently, I read again the book Turtle Geometry: The Computer as a Medium for Exploring Mathematics by Harold Abelson and Andrea diSessa. Although dated in the 1980s, it is still one of my favorite books. You can get a peek of the book content from Brian Hayes’ article. The chapter on curvature is developed from this paper of Andrea diSessa.

Those who know the graphic programming language Logo will be familiar with the turtle. You can easily get some fancy graphics on the screen by programming the turtle. If you’re a kid, you’ll be fascinated. If you’re not a kid, soon you may get bored.

However, the book shows how this turtle can lead you to explore the world of math, mostly geometry, as well as elementary number theory, logic proofs, and general problem solving skills via programming. If you follow the projects in the book, you’ll get the turtle running on 2D curve surfaces, roaming in 3D space, even venturing into the Einstein’s curved spacetime. So there can be a lot of math under the name “Turtle Geometry”.

All these wonderful activities are done by Logo-like programs, i.e. algorithms using loops and simple recursion, manipulating vectors. They are not deep, but can be quite involved, e.g. in demonstrating Einstein’s general relativity.

Message of the book is this: geometry can be studied locally, from turtle’s viewpoint. This is in contrast to the usual classroom or textbook treatment of geometry, which takes a global viewpoint. When we draw triangles, circles, or just intersecting lines on paper, we are taking the bird’s-eye view. We’ve learnt a lot of geometry from this global view, so it is refreshing to find out how much a turtle can learn from its local view. It turns out that a lot of global features can be deduced via logic if you’re a smart turtle.

Long long ago all humans were “turtles” living on the ground. Most believed that the ground is flat, but the smart one have already deduced that the Earth is round. Craftsmen made pretty accurate globes long before astronauts take the Earth-rise picture from Moon journey.

Though viewpoints may differ, the geometrical results are the same. The authors show the equivalent of these viewpoints by examples, program codes (i.e. algorithms), math calculations, even logic proofs – in words. It will be a challenge to verify this equivalence formally, via theorem-provers.

I think formalizing Turtle Geometry will be a good research project.