Skip to content

AlexandraCordeiro/generative-bonsai-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

generative-bonsai-tree

My first Processing sketch! A generative bonsai tree using Processing

Motivation

The idea came about as a way of exploring this tool, as well as generative design.

How it works

Both the pot and the bonsai trunk are static. The trunk is defined by the curves of 2 parabolas.


The branches are drawn according to a recursive function. Essentially, a branch is subdivided into several segments. Each segment is defined by the curve of the function:

    y = branchDirection * branchInclination * sqrt(x)

The branchDirection and branchInclination variables take random values in each branch segment. The number of segments in a branch symbolizes the depth of the recursion. Each branch can create new sub-branches with lower depths than the main branch.


The leaves (represented as circles) are drawn vertically, according to a reference point on a branch. The idea is to draw circles above and below this reference point. The number of circles drawn is random, creating diversity in the density of the leaves.


The colors are chosen according to previously defined color palettes that allude to the different seasons.

Inspiration

Releases

No releases published

Packages