CS446 - Computer Graphics
Dr. Jesse Johnson
Assignment / Project
November 2006
This was an open-ended assignment with the main goal being to create the most realistic tree possible. The program uses a recursive algorithm coupled with a tree-like object model to create the tree's structure. Many variables associated with the tree's appearance, such as the branch length, randomness, angle variability, thickness, etc. can be adjusted through a settings window with slider bars. The tree and world make heavy use of texture mapping and lighting to create a realistic scene. The world allows the user to navigate through using an intuitive camera system using the keyboard and mouse that is similar to those found in first person shooter spectator cameras.
FeaturesWhenever I'm given an open-ended assignment, I tend to spend a ridiculous amount of time working on it. I think I spent around 40 to 50 hours on this. I had a lot of fun programming it, though, which explains the amount of time I put into it. I approached building this problem by breaking the recursive structure into a simple object model that centers around a Branch object. Branch objects have a length, thickness, and angle relative to the root, as well as connections to other branch objects. After setting up this object model and encapsulating it as a Tree object (basically a branch object with a x,y,z location) I added a draw method to recurse through the object model and produce a simple wireframe. Before I got the math pinned down, the tree looked like a thistle. Eventually I flushed out the graphics and went a step further by adding texture mapping and lighting. I used this project as a prototype of sorts for my next project, the 3D interface for Musaic.