## Fun with Lindenmayer systems

Lindenmayer systems (L-systems) produce fractal pictures using recursion to rewrite a string of symbols, together with a drawing mechanism to convert symbols to drawing elements. M4 is a natural choice for recursion, and dpic macros are suitable for implementing drawing actions.

The number of picture elements can be quite large and can overflow the capacity of LaTeX, so the capabilities of dpic to produce diagrams without invoking LaTeX are needed.

Many of these examples are credited to Paul Bourke and others, see <bp> http://paulbourke.net/fractals/lsys/ <bp> See also https://en.wikipedia.org/wiki/L-system

define(`cfig',`

$1.m4

') define(`m4tt',`')

cfig(Cantor) cfig(Dragon) cfig(Bush5) cfig(Algae1) cfig(Algae2) cfig(Bush1) cfig(Bush2) cfig(Bush3) cfig(Bush4) cfig(FractalPlant) cfig(HexagonalGosper) cfig(KochCurve) cfig(KochSnowflake) cfig(Leaf) cfig(Levycurve) cfig(OL) cfig(SierpinskiArrowhead) cfig(Sticks) cfig(Tiles1) cfig(Weed)