A comprehensive graphical and command-line editor for creating, manipulating, and visualizing Lindenmayer systems (L-systems).
This project was initially developed as part of a university project.
L-systems (Lindenmayer systems) are a type of formal grammar introduced by biologist Aristid Lindenmayer in 1968. They are particularly useful for modeling plant growth and generating fractals. An L-system consists of:
Through recursive application of these rules, complex structures can be generated from simple initial conditions.
.ls filesalr install lsystem_editorgit clone https://github.com/Heziode/lsystem-editor.gitalr build or manually with makeLaunch the graphical interface:
./bin/lsystem_editor
# Or
alr runThe GUI offers:
For automated processing or batch operations:
lsystem_editor --no-gui [OPTIONS]| Option | Long Form | Description |
|---|---|---|
-i | --input=FILE | Input file containing an L-system definition |
-o | --output=FILE | Output file to store an L-system definition |
-e | --export=FORMAT | Export format for the L-system representation |
-p | --export-file=FILE | Output file for the exported representation |
-d | --develop=N | Number of development steps to apply |
-w | --width=N | Width of the output representation |
-h | --height=N | Height of the output representation |
-b | --background-color=COLOR | Background color in hex format (e.g., #AABBCC) |
-f | --foreground-color=COLOR | Foreground color in hex format (e.g., #AABBCC) |
-mt | --margin-top=N | Top margin for rendering |
-mr | --margin-right=N | Right margin for rendering |
-mb | --margin-bottom=N | Bottom margin for rendering |
-ml | --margin-left=N | Left margin for rendering |
L-system definitions are stored in .ls files with the following syntax:
<angle> [angle in degrees]
<axiom> [initial string]
<rules>
[symbol] [replacement string]
[symbol] [replacement string]
...
</rules>60.0
-F++F++F
F F-F++F-FWhere:
F means "draw forward"+ means "turn left by angle"- means "turn right by angle"L-System Editor is distributed under the MIT License.
Copyright (c) 2018 Quentin Dauprat (Heziode)
See the LICENSE file for full details.
Globally install this crate:
alr install lsystem_editorAdd to your project:
alr with lsystem_editorDependencies: 2
Dependents: 0
Versions: 1