The Algorithmic Beauty of Plants

| reading

I read the first two chapters of The algorithmic beauty of plants, a book by Pru­sin­kiewicz and Lindenmayer first published in 1990, and liked the 2D plant images generated by different L-systems. So I generated the images myself with a bit of Java­Script. All that was necessary was (1) some string rewriting, and (2) a basic turtle graphics implementation for generating SVGs from strings (move forward, turn left, turn right, jump to a position).

Here are a few plants from context-free productions. The L-systems can be implemented with simple string replacements.

Plants generated with bracketed OL-systems (context-free productions)

Then three incarnations of a stochastic L-system, where the same symbol is replaced by one out of a few rules, each with a certain probability.

Different plants generated with the same stochastic L-system

Finally three examples of plants from Hogweg and Hesper (1974), which result from context-sensitive productions. Implementing context-sensitive replacements on axial trees is no longer trivial.

Plants generated with bracketed IL-systems (context-sensitive productions)

The next step would be parametric L-systems, but at this point I ran out of time. In any case, I recommend reading the book. It's surprising how a few very simple rules can lead to such intricate and beautiful structures after only a couple of iterations.


Hogeweg, P., & Hesper., B. (1974). A model study on biomorphological description. Pattern Recognition, 6:165–179.

Prusinkiewicz, P., & Lindenmayer, A. (2012). The algorithmic beauty of plants. Springer Science & Business Media.