Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (50 sloc) 2.72 KB


@lindenmoji renders Lindenmayer systems. You may specify an L-system by specifying an initial condition, defining rules, and defining settings.

This is a valid L-system that draws a single line:

a; a=F

The initial condition is the rule a, which contains only the command F--the command to move the cursor forward and draw a line (which may also be invoked with ➑️ and β†’).

A more complex system looks like this:

aaaa; a=FO+; πŸ“=90

This defines an initial condition of aaaa ("do rule a four times") and defines a as "draw a line", "draw a circle", and "rotate by the rotation angle". πŸ“ is a setting that specifies the rotation angle, in this case 90 degrees. The output is a square with a circle drawn at each corner:

a square with a circle centered on each corner

An even more complex system that draws a leaf looks like this:

F; F=F[++F[-F]]F[-FF[F]]; πŸ“=12; 〰️=0.8; πŸ₯=0.6

the skeleton of a leaf

This system draws the Peano-Gosper curve, it's the first example to define more than one rule:

Fx; x=x+yF++yF-Fx--FxFx-yF+; y=-Fx+yFyF++yF+Fx--Fx-y; πŸ“=60

the Peano-Gosper curve


Symbol(s) Description
➑️, β†’, F Draw a line in the direction of the heading. Takes an optional length.
‡️, M Move the cursor in the direction of the heading. Takes an optional length.
β†ͺ️, β†ͺ, - Rotate the heading counter-clockwise by the rotation angle.
↩️, ↩, + Rotate the heading clockwise by the rotation angle.
⬜️ Draw an empty square. Takes an optional size.
⬛️ Draw a filled square. Takes an optional size.
⭕️, O Draw en empty circle. Takes an optional size.
πŸ”΄ Draw a filled circle. Takes an optional size.
πŸ“ Rotate the heading by the specified positive or negative angle.
🎨 Set the line color. There are approximately 10 colors available.
[ Store the current state.
] Restore the previous state.


Symbol Description
πŸ“ Set the global rotation angle.
πŸŒ‡ Specify a gradient background. There are approximately 7 backgrounds available.
πŸ₯ Set the variation in angle.
〰️ Set the variation in distance.
🎨 Set the default line color.
🌝 Set the default line opacity.
🌞 Set the default fill opacity.