website | twitter

Monday, October 06, 2008

Inspy from Turtle Geometry

Turtle Geometry by Harold Abelson and Andrea diSessa has a lot of interesting examples of turtle graphics. Especially I was fascinated "inspy" program. The basic structure of inspy is same as spiral. But instead of the side, value of the angle is changed in each step. I have explored a bit for a demo of Chalkboard project http://tinlizzie.org/chalkboard/#Inspi.

To make the study easier, I made a trick to connect an event handler and an inspy program. You can play with a dynamic version of inspy program with it (Please move the mouse on next rectangle). And you may find various patterns even from such simple program. Here I present stand alone version (Only Firefox and Safari are supported).

inspy
inspi = function(side, angle, inc) {
  for (var i = 0; i < 720; i++) {
    forward(side)
    right(angle + inc * i)
  }
}
inspi(15, mouseX(), mouseY())

3 comments:

  1. Very nice. I really like the simple rules that generate complex patterns.

    ReplyDelete
  2. I am thinking using this idea to create other drawing using different functions. This is a pretty interesting digital art!

    ReplyDelete
  3. Yes, there are still a lot of interesting ideas in old days. Especially because we have huge computer power compared to the time when turtle graphics was invented, I think we should revisit those ideas again.

    ReplyDelete

 
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.