This project provides an implementation of L-systems (Lindenmayer systems) using Python and Pygame. L-systems are a mathematical model used to describe the growth of plants and other organic structures through recursive string rewriting.
L-systems are a formal grammar system invented by Aristid Lindenmayer in 1968. They are particularly well-suited for modeling the growth of plants, trees, and fractals. The system consists of:
- Alphabet: A set of symbols that can be replaced (or rewritten).
- Axiom: The initial state of the system.
- Production rules: A set of rules that define how each symbol in the alphabet is replaced by a string of symbols.
Each iteration or generation of the system produces a new string based on the production rules. When visualized, L-systems can create complex, fractal-like structures that resemble plant growth, tree branches, and more.
- Preset L-systems: The following preset L-systems are available in the project:
- Dragon Curve
- Tree
- Mandala
- Planet
- Pentigree
- Hex Fractal
- Wings
- Snowflake
- Tentacle Fractal
some of the LSystems are taken from here
- Python 3.x
pygame
To install the required libraries, you can use the following command:
pip install -r requirements.txt
For more information, check out the Lindenmeyer Systems doc
This project is licensed under the GNU License - see the LICENSE file for details.