A recursive fractal tree drawn with raylib in C.
Starting from a single trunk at the bottom of the window, each branch splits into two children rotated ±25° from their parent, each 75% of the parent's length and thickness. The recursion stops once a branch is shorter than one pixel, which produces the dense "canopy" at the top.
Renders in an 800×600 window.
- A C compiler (
clangon macOS,gccon Linux) make- raylib
Install raylib:
brew install raylibsudo apt install libraylib-devmake runOr build and run as separate steps:
make
./canopyRemove the binary:
make cleanIf raylib was built from source instead of installed through a package manager, point the build at it:
make RAYLIB_PATH=/path/to/raylib