< - - - - - - Hover over numbers to see it grow! - - - - - - >

Playing with the recursive tree structure, one the basic topics packaged in Processing. I probably should have done some research into the math of actual tree structures. Two minutes of Wikipedia scanning and Google-fu didn't yield much. I need diagrams!. Instead I'm working off of my own conceptualization of how trees grow. Here's how this baby works:

  1. Branches grow 1 unit every increment. These are the brown branches.
  2. After a branch is 2 units long, a separate child branch is produced 2 units down. These are the green branches.
  3. Child branches are produced on alternating sides. The first branch will be on the left. The second branch will be on the right. And so on.
  4. The angle of the child-branch to the parent-branch is based off its generation. So no branch will ever touch the ground
  5. Branch width is based off its age. Older branches/sections will be wider

As you can see, the results are pretty good for its early life - stages 1 through 8. Afterwards its obvious that there are not enough branches at the top. I'll have to play with the child-branch angle. Also, this model does not account for crowding of the branches. Nor does it factor in how the branch sections would grow in length. That initial section should grow longer. At least, that's what I think it should do.