In 1968, Hungarian botanist Aristid Lindenmayer developed a grammar-based system to model the growth patterns of plants. Lindenmayer systems — or L-systems for short. This system was made as a mathematical theory of plant development.

L-systems involves three main components:

**1. Alphabet:** a set of valid characters that can be included in a “sentence”. For example, if the alphabet is “ABC”, any valid “sentence” will contain the three characters : A, B and C.

**2. Axiom:** The sentence that describes the initial state of the system. For example, using the alphabet “ABC,” some example axioms are “AAA” or “B” or “ACBAB.”

**3. Rules:** they are applied to the axiom and then applied recursively, generating new sentences over and over again. An L-system rule includes two sentences, a “predecessor” and a “successor.” For example, with the Rule “A → AB”, whenever an “A” is found in a string, it is replaced with “AB.”

**Example**

Alphabet: A B

Axiom: A

Rules: (A=AB) (B=A)

## Plug-in Rabbit

I used plug-in Rabbit: https://morphocode.com/rabbit/

This type of drawing framework is called “Turtle graphics”, it is like having a turtle in the screen and being able to command it to move in different directions.

**L-system commands**

**F ** move forward at distance L and draw a line

**f ** move forward at distance L without drawing a line

**+ ** turn left A degrees

**- ** turn right A degrees

**[** save current location

**]** restore previous location

**A/B/C/D** placeholders

## Snowflake

## Hilbert curve

## Peano curve

## Dragon curve

## Plant

## Greenhouse structure

In the Grasshopper script you can change the height of each level of pipes – pink circle.

And in the blue and yellow rectangle you can change length and diameter in each level of the structure.

Grasshopper file: L-system to greenhouse structure