A procedural tree generator that creates randomized, organic-looking trees with blossoms using Python's turtle graphics.
- Recursive branch generation with random angles and lengths for natural-looking results
- Pink petal/blossom generation at branch endpoints
- Interactive GUI with 10 adjustable sliders for real-time parameter control
- No external dependencies — uses only the Python standard library
Download tree-gen.exe from Releases and run it. No Python installation required.
Requires Python 3.10+ (uses match/case syntax).
# GUI version (recommended)
python treeGUI.py
# CLI version
python tree.py| Parameter | Range | Default | Description |
|---|---|---|---|
| Starting Length | 50–200 | 125 | Initial branch length |
| Min Branch Length | 5–30 | 10 | Minimum length before a branch terminates |
| Max Depth | 5–15 | 10 | Maximum recursion depth |
| Death Chance | 0.0–0.5 | 0.1 | Probability a branch randomly dies |
| Angle Min / Max | 5–45° | 15° / 30° | Angle spread range for branching |
| Extra Branch Odds | 0.0–0.5 | 0.15 | Chance of secondary branches |
| Branch Ratio Min / Max | 30–90% | 70% / 77% | Child branch length as a percentage of parent |
| Petal Odds | 0.0–1.0 | 0.6 | Probability of drawing petals at endpoints |