This is an implementation of the context-free Lindenmayer system to create fractals.
A lot of natural phenomena like the looks of trees or snowflakes can be described by Lindenmayer fractals. Those fractals reproduce themself recursively with the same patterns and eventually create structures we know from nature.
You can create your own fractals in the main.cpp where you specify the initial word and the production rules. The results will be saved as svg-files in the 'results' folder. In the folder 'examples' are some examples of common fractals.
Fractal Tree:
Stage 1 | Stage 2 | Stage 3 |
---|---|---|
Stage 4 | Stage 5 | |
Fractal Koch Snowflake:
Stage 1 | Stage 2 | Stage 3 |
---|---|---|
Stage 4 | Stage 5 | Stage 6 |
This program was tested on
- Fedora 33, 64-Bit
- GCC 10
but might also work on other versions