Labs » Tree Grower
Tree Grower
The Tree Grower is a recursive algorithm simulating the growth of a tree. Each tree is made up of many nodes.

figure a. The nodes that make up an individual tree.
CLICK the tree to begin anew.
Each tree begins as a single node that has a direction, destination, and velocity. Once it reaches its destination it then spawns a new node, an extension node, with a new destination which extends off of the previous node. Furthermore, each time a new node is spawned it has a life one less than its parent. If a nodes life is zero then it does not spawn when it reaches its destination.
On top of being able to spawn extension nodes, a node can also create branching nodes once it reaches its destination. The amount and direction of branches are based on random variable with certain degrees of freedom. Different degrees of freedom result in very different looking trees.
Finally, each branch tracks its own level. Each time a branch makes a new branch, the new branch has a level one more than its parent. The maximum amount of branches is a random variable unique to each tree.

David Brody, Nov 2008
Home  | About  | Labs  | Creations  | Library  | Contact
© 2010 David Brody