Saturday, 14 December 2013

Peano Curve

For this demo we travel back to the 19th Century Peano Curve - a space filling curve discovered 1890 by Italian mathematician Guiseppe Peano. He went on to some interesing work in Fractals.

Whilst researching the Peano curve, I found the best way to implement it was recursively and a Python sample showed a neat example using Turtle Graphics. Turtle Graphics was always in those computer books I grew up with (1980s!) complete with robot turtle usually with a pen attached. I had never actually code anything using it- turns out a basic turtle class is pretty easy so I chose this to implement this demo. It is a very fun abstraction / model. I threw in some colour to liven things up and rendered to the HTML5 Canvas. Hopefully I will revisit the turtles soon and have an animate implementation of the Curve. For now, here is the live demo and the GitHub.

Can someone work on the robot for me? I'll bring the pens :-)