This is a port to Odin of the procedure generated ASCII art bonsai tree generator PyBonsai by Ben-Edwards44.
- Procedurally generates ASCII art trees in your terminal
- Multiple tree types : Classic, Fibonacci, Offset Fibonacci, and Random Offset Fibonacci
- Animated drawing with adjustable speed
- Colorful output using ANSI escape codes
- Customizable tree parameters
Make sure you have the Odin compiler installed.
make./odin_bonsai [OPTIONS]-h, --help- Display help--version- Display version-s, --seed- Seed for the random number generator-i, --instant- Instant mode: display finished tree immediately-w, --wait- Time delay between drawing characters (default: 0)-c, --branch-chars- String of chars randomly chosen for branches (default: "~;:=")-C, --leaf-chars- String of chars randomly chosen for leaves (default: "&%#@")-x, --width- Maximum width of the tree (default: 80)-y, --height- Maximum height of the tree (default: 25)-t, --type- Tree type: integer between 0 and 3 inclusive (default: random)- 0: Classic Tree
- 1: Fibonacci Tree
- 2: Offset Fibonacci Tree
- 3: Random Offset Fibonacci Tree
-S, --start-len- Length of the root branch (default: 15)-L, --leaf-len- Length of each leaf (default: 4)-l, --layers- Number of branch layers (default: 8)-a, --angle- Mean angle of branches to their parent, in degrees (default: 40)-f, --fixed-window- Do not allow window height to increase
Generate a tree with instant display:
./odinbonsai -iGenerate a tree with animation:
./odinbonsai -w 0.01Generate a specific tree type with custom parameters:
./odinbonsai -t 2 -l 10 -a 30 -iGenerate a reproducible tree with a seed:
./odinbonsai -s 12345 -iPorted from PyBonsai Ben-Edwards44
https://github.com/Ben-Edwards44/PyBonsai.
Original quote:
I speak for the trees, for the trees have no voice.
- The Lorax, 1971
License MIT Open source
Best regards,
Joao Carvalho



