L-system to greenhouse structure



Author:

Categories: PN3+DC3

Tagged with: | | | | |


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)

1_CYuC8OMD6O_G5XCrYXKxcQ

 

 Plug-in Rabbit

l-system-5

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

l-system-8

Hilbert curve

l-system-9

Peano curve

l-system-10

Dragon curve

l-system-11l-system-24

Plant

l-system-25l-system-26

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

l-system-29