2D L-System Generator

About
My implementation of a L-System generator, written in Python. The generator is designed to run in a unix based operating system like MacOS and/or Linux. The L-System pattern is generated in normal Python. The GUI uses the Python package, Tkinter, to provide a way for users to input values for the L-System generator. The Python package, Turtle, to daw and display the generated L-System pattern.
Generated Sample Patterns








How To Use
-
Clone the project’s code from Github: https://github.com/MehmetMHY/2d-l-system
-
Run the main.py script to run everything, with the following command (run this once and after you understand the warning message, then start running this command with the -nw option):
# run with the initial warning message python3 main.py # run without the initial warning message python3 main.py -nw
-
The script, after showing the GUI, generates an eps file with the L-System pattern. To convert an eps file to a png, you can use the eps_to_png.py python script by running a command like this:
python3 eps_to_png.py example.eps example.png
Sources
- https://en.wikipedia.org/wiki/L-system
- http://paulbourke.net/fractals/lsys/
- http://www.motionesque.com/beautyoffractals/
- http://paulbourke.net/fractals/lsys/
- https://www.python-course.eu/tkinter_entry_widgets.php
- https://www.python-course.eu/tkinter_text_widget.php
- https://www.geeksforgeeks.org/open-a-new-window-with-a-button-in-python-tkinter/