Skip to content

21bhumika/Bonsai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bonsai

Run

python main.py

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.

Description

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.

What's next

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)

Image gallery

Image Image
Image Image
Image Image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages