7 Days of Source Day #3 – tree.growth



Project: tree.growth
Date: September, 2006
Language: Processing
Key Concepts: Lindenmayer Systems, recursion, biomimicry


NOTE: My apologies for this one being a day late. You’ll notice that I never said 7 consecutive days of source releases!

Today I’m dusting off some old code, and releasing one of my favourite projects. I had hundreds of requests for source over the years, and am finally making a public release.

Trees are uniquely suited to being simulated using computer graphics. Indeed, since the 1970s, methods to algorithmically render trees have been developed and refined to the point at which trees seen in high-quality scenes are very nearly photorealistic. For this project, rather than concentrating on realistic renderings, I was instead interested in how simple forms could capture the inherent ‘treeness’ of the real thing.

In pursuit of this goal, I developed a customized software engine which produced vector renderings of imaginary tree species. By adjusting parameters in the program, trees could be rendered with various leaf shapes and colours, with flowers or shedding leaves, and in virtually any shape from small shrubs to towering birches.

The software uses a modified version of Lindenmayer Systems, a variant of formal grammar used to model growth. L-Systems were developed by the Hungarian theoretical biologist Aristid Lindenmayer.

This release version doesn’t have bitmap or vector output built in, but it would be fairly trivial to get this hooked up and working to output high-resolution bitmaps (using Marius Watz’ TileSaver class) or .PDFs (using the standard Processing PDF library).

Archive quality prints from this series are available in my Etsy store.

Finally, this code was written in 2005 – so there is a lot of room for optimization and improvement. If you end up using or improving the code for this project, please let me know.

Getting Started:

Move the sketches into your Processing sketch folder. Open Processing and open the treegrowth sketch from the File > Sketchbook menu. You’ll find detailed instructions in the header of the main tab (the treegrowth.pde file).


When I was getting started with Processing, I got a lot of help from the community over at Processing.org. I’d also like to thank Casey and Ben and all of the Processing team who have put so many hours into making this tool. It really is something special.

Download: tree_growth.zip (140k)


This software is licensed under the CC-GNU GPL version 2.0 or later.

5 thoughts on “7 Days of Source Day #3 – tree.growth”

  1. Thank you for posting this. I have tried to run the project in Processing 1.2.1 but nothing happens (no output window appears). Am I missing a config step? Or is it because it was written for an earlier version of Processing?

    Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *