May 31, 2011

Random Recursion Tree

One of my favorite things about programming is all the interesting mistakes along the way. Here are a few screenshots during my progress towards creating a tree using recursion.
      

This one was my favorite. I just wanted to print the angles at each vertex. I forgot to dial down the number of branches and was presented this awesome number tree.


At this point I more or less had it working. I still plan to do more but here are a few shots of a working randomly generated tree using recursion.

No comments:

Post a Comment