Playing with L-Systems Because emergence is cool.

What's an L-System?

From Wikipedia:

An L-system or Lindenmayer system is a parallel rewriting system and a type of formal grammar. An L-system consists of an alphabet of symbols that can be used to make strings, a collection of production rules that expand each symbol into some larger string of symbols, an initial "axiom" string from which to begin construction, and a mechanism for translating the generated strings into geometric structures. L-systems were introduced and developed in 1968 by Aristid Lindenmayer, a Hungarian theoretical biologist and botanist at the University of Utrecht. Lindenmayer used L-systems to describe the behaviour of plant cells and to model the growth processes of plant development. L-systems have also been used to model the morphology of a variety of organisms and can be used to generate self-similar fractals such as iterated function systems.

In other words, it's a set of rules that allow complex behavior to emerge, by using a simple grammar and some constraints.

L-System Original

Rules:

A => BA
B => A

L-System four setting

Rules

A => AB
B => AC
C => DA
D => BA

L-System four setting alt

Rules

A => CA
B => BD
C => AA
D => DA