A command line tool that outputs images of L-Systems that are specified in a json format.
{
"iters": 6,
"alphabet": ["X", "F", "+", "-", "[", "]"],
"axiom": ["X"],
"rules": {
"X": ["F", "+", "[", "[", "X", "]", "-", "X", "]", "-", "F", "[", "-", "F", "X", "]", "+", "X"],
"F": ["F", "F"]
},
"interpretation": {
"F": [{"forward": 10.0}],
"-": [{"left": 25.0}],
"+": [{"right": 25.0}],
"[": [{"push": null}],
"]": [{"pop": null}]
}
}
Use cargo to build and run the project:
cargo build
cargo run -- l_system_json_file_path
The output will be in test.svg.