Branching Systems

Growing Trees and Neurons

active-dates: late 2006

This was a weekend project to simulate branching systems like trees and neurons. It was inspired by the Paths project at Complexification, which simulates simple paths without branching.

I'm fascinated by how simple the rules are that govern these kinds of branching systems. Also, it seems like there are similarities among branching systems of all types. Trees grow leaf-covered branches with the purpose of increasing the probability of acquiring photons. Neurons grow dendritic branches with the purpose of increasing the probability of making synaptic contacts with other neurons.

Each source starts with a certain number of paths, and each path has its own velocity vector which determines the direction of growth. The paths have a bunch of parameters, like Gaussian noise variance on the growth vector, branching probability, thinning rate, etc. I wrote the code in Python. I used PyOpenGL to draw all the paths as translucent antialiased lines. At each step I just draw a small line segment at the end of each path, and I never clear the frame buffer. It runs pretty fast since I'm not redrawing everything constantly.

A few years later I spent time on a 3D version, which then required redrawing the scene on each frame due the need for a movable camera. This turned into the commercial app iBonsai.

Four trees on white background
Four trees on black background
Dense row of trees
Single neuron
4x4 neuron grid
Three neuron columns
10x10 neuron grid