For this final project i decided to do the L System trees. I think that when I looked at all of the different project ideas I thought that the recursive tree would be the easiest.
The first thing that I thought about when I saw the trees were was the L Systems example in Processing's examples. The code for this project was so short that i figured that I would be fine doing a 3D l system tree. Triangles in chapter 3 is the base of my program. After I became familiar with all of the methods and whatnot I decided to weed out what I didn't need. So i open 2 other projects from the Superbible and deleted everything in them and rewrote the entire program with only what i needed and no comments.
I also looked at the wikipedia entry, which makes sense but i did not really use it to do any of the programming for the project.
The first thing that I knew that I would need was a cylinder, which I found at this site. It turns out that this site had a lot of extra material that was useless but I did get the few lines of code needed to make a cylinder.
Once I learned how to draw the cylinder I started playing around with the translation matrices to get it to the bottom and then. Once I figured the translations I started playing with the rotations and from there it has just kind of been adjusting the different settings to find what looks the best. I have tried to use some different colors but it seems that open GL wont change the colors when the branch length gets short enough.
The first tree is just random placements and it was the first tree that I made. I really didn't know what was going on so the branches kind of go in different directions. The second shoots out about 8 branches from every branch by rotating once on the x axis and then one of the y axis. Once I got this code working i found the polygon garden website from the blog and saw their approach to rotations I then tried one similar to theirs which kind of shoots off branches like a sprinkler shooting off water. For the third one the code is about half as long.
cboard.cprogramming.com/game-programming/71357-need-some-help- drawing-cylinder-opengl.html
processing.org/
opengl.org/superbible
http://www.director-online.com/buildArticle.php?id=1119


