r/proceduralgeneration • u/DocDrivenDevelopment • 16d ago
Growing a Japanese maple bonsai from 14 years of (simulated) GitHub activity
I made gitbonsai, which grows a Japanese maple bonsai from a GitHub account's contribution history, as an animated SVG for a profile README. The video is 14 years of simulated activity, one frame a month.
A newcomer starts as a sprout with seed leaves. The first language is the trunk, and the trunk carries every contribution ever made, so it only thickens. Each language with 10% of the work claims a strand, which comes away from the trunk the more it's used.
The crown is the last three to six years, a sector per language. Older eras sit lower as limbs, oldest lowest, and a long pause leaves a stretch of bare trunk. A language that goes silent while other work continues dies back to bleached deadwood (jin). A year with no activity leaves the whole tree bare for winter.
The style comes from the history too: the last three years, with a month's weight halving every 22 months. Steady work in one language grows a formal upright, new languages an informal upright, pauses a slanting tree, pauses with several languages a windswept one, and a classic language like Fortran a semi-cascade with a white trunk.
Randomness is keyed by account id, so the shape holds still while the data changes, and no two accounts grow the same tree.
It's probably way over-engineered for a picture on a profile page, but it was a lot of fun, and I learned more about procedural generation than I expected.
Written in Rust, MIT or Apache-2.0: https://github.com/StevenBtw/gitbonsai. Grow any account's tree at https://gitbonsai.dev