Skip to content

hexaredecimal/TreeLibre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 

Repository files navigation

TreeLibre

An interactive 2D fractal tree generator/simulator created in Java.

It simulates organic tree growth using a recursive branching model influenced by adjustable physical parameters such as branch splitting ratios, angles, etc. Each branch dynamically adapts to simulated wind and regenerates into unique tree structures at the press of a key.

Showcase

image

Features

  • Dynamic trees
  • Dynamic flowers
  • Dynamic leafs
  • Simulation Controls
  • Full UI built in Java

How It Works

  1. The Tree class holds a single root branch.
  2. Each Branch recursively spawns two sub-branches, splitting length and thickness based on:
  • Flux division factor – how much “energy” goes into each branch
  • Branching angle – how far branches diverge
  • Scaling factor – how quickly branches thin out
  1. Branches stop growing when their diameter falls below a leaf cutoff threshold.
  2. Wind forces perturb the direction of each branch recursively, creating smooth, realistic motion.
  3. Flowers and leafs are drawn at the leaf cutoff threshold

Inspirations:

Augustge's Tree animation: https://github.com/augustge/augustge.github.io/Animations/TreeGenerator

TreeStudio: https://www.pixarra.com/tree_studio.html

Libraries:

About

A 2D tree generation application in Java

Resources

Stars

Watchers

Forks

Packages

No packages published