Draw simple L-System trees using Godot and rust. 🌳🤖🦀
This project implements procedural drawing of trees in Godot engine using Lindenmayer Systems.
The tree is first drawn with a Turtle implementation, as seen in The Algorithmic Beauty of Plants. It is converted to SVG in memory, and then to PNG bytes which are consumable by Godot.
This project implements a cache of Image
outputs, reducing the time it takes to reproduce individual tree styles.
We found that Godot custom drawing in 2D slows the frame rate when compared to using sprites/textures.
You need to build the gen
dependency so that Godot has access to the shared lib written in rust:
cd gen
cargo build --release
Thanks to mneumann for the implementation of L-Systems and Turtle Drawing.