Posted October 28, 2011 at 15:56 in Graphics, Illustrator, Scriptographer - Say something

A year ago, almost to the day, as I was searching for ways to procedurally make random street maps (of which I wrote a post here), I got wind of L-Systems which seemed like a good venture for Scriptographer. I found Aristid Lindenmeyer‘s, book – The Algorithmic Beauty of Plants – as a high quality PDF (available for download here). But somehow this whole undertaking slipped away from me and I ended up doing something else. When I finally got to it, I rewrote the whole thing in one sitting. As a matter of fact, I had very much help from an unexpected find and seemingly unrelated blog by Graham Bradley where he thoroughly explains how he made an Enigma cipher emulator in javascript.

Although having nothing to do with me, I found this nice treelike structure that exhibits the Fibonacci number properties (the increasing branches) which is not very hard to achieve with an L-System. At its most basic form it would look like this.

Axiom: A

A → AB

B → A

I’m fairly happy with the script as it gets the job done and it is available for download here. There are a lot of tweaks to be made, for sure, but these curves are all produced in Illustrator. This is one of my favourite grammars, the Cesaro’s Sweep. It is actually a variant of the Koch Snowflake but I think it looks like trees. Another one of many variants of the Koch curve. This is a Quadratic Koch Island. The last one is called a dragon curve. The keen observer will also recognize this as the curve from the Jurassic Park book. There is also a pretty handy Java applet by Christopher G. Jennings to play with here.