Inspiration
Our project was inspired by the beauty and the elegance of bonsai trees. ZenGrow reflects the philosophy of bonsai through minimalist code. A beautiful visual, handcrafted through code. The bonsai trunks and branches grow through recursion, fragmental branching, and generating a hue of leaf colors. The result is a generative art piece that’s simplistic and calming, a visual space for slowing down and watching something simple take form. The goal isn't realism—it's peace.
What it does
ZenGrow generates a unique, hand-drawn-style bonsai trees bonsai tree with each run. Starting with a trunk formed by connected Bézier curves, we recursively add branches that naturally taper toward the top. Leaves or flowers appear at branch tips using palettes of natural tones, giving each tree a distinct personality.
How we built it
ZenGrow is implemented in Python, with Matplotlib. The project uses random variables and mathematical equations to simulate bonsai growth, blending geometry with randomness to give a natural looking bonsai result.
The trunk is drawn using distorted Bézier curves, with randomly placed buds that may sprout into branches or wither away, mimicking natural growth. Branches grow recursively, with length and angles determined by controlled randomness. Leaves are ovals drawn in clusters, using curated palettes for seasonal variety. Flowers are created by arranging petal shapes in circles; each petal is defined by a sine curve and modified with Perlin noise to simulate natural bumps and irregularities.
Challenges we ran into, and how we solved them
Simulating natural beauty with randomness was difficult. It is challenging to make a tree look intentional, not chaotic. We iterated on recursion depth, angles, and spacing until the structures felt balanced. Realistic petals were hard to render, so we leaned into a minimal style using curves and noise. Managing placement of leaves and branches required a system of buds placed at specific points. Integrating all elements into a coherent visual took many rounds of debugging
It is difficult to simulate the realism of petals. To combat this challenge, we completely avoided it. We instead adopted a minimalistic look and feel. We also couldn’t implement textures for the parts of our bonsai, and therefore adopted a flat color style. All shapes are rendered with flat colors, allowing the interplay of curves, lines to carry the visual weight.
Accomplishments that we're proud of
Creating ACTUAL BONSAI, AND NOT JUST A COLLECTION OF LINES! Building a fragmental recursion algorithm, with factors that mimics natural branching Designing a reusable and extendable leaf color system Making our bonsai without the need for complex structures, just lines, ovals, and simple solid shapes.
What we learned
How to make lines look like branches and trees, using generative processes and recursion Using simple shapes to form complex structures. Setting the colour theme, even the smallest change can cause big disasters
What’s next for ZenGrow
Making a more realistic image of different species of bonsai Add elements to replace/combine with leaves. Like blossoms, autumn leaves, winter bare trees Introduce gentle wind animations or background effects or a foreground (a butterfly flying to sit on the tree)
Built With
- matplotlib
- python
Log in or sign up for Devpost to join the conversation.