Tree Generator FAQ

Why use Python?
Usually graphics demos are programmed in C or C++. I chose to use Python instead, because:
  1. It's a higher level language, so I can program software faster in Python than in C++. I don't have to worry about memory management, and useful high-level data structures, like lists and hashs, are inbuilt into the language.
  2. Python supports OpenGL, and there are a number of modules that can save a programmer a lot of time. The Numeric module handles matrix mathematics for me. The Pygame module handles user input events and allows me to easily create textures from a wide variety of file formats.
  3. Python is multi-platform. I can develop my demo in Linux, and easily port it onto Windows. I can create a stand-alone Windows exe file with Py2exe.
  4. Python is slower than compiled C++, and would not be suitable for programs that need cutting edge computers to run. Fortunately, the tree generator demo needs very little resources to run smoothly, so the performance hit due to using Python isn't perceivable on most modern computers.
Why a tree generator?

During the final year of my degree, I attended a talk on the computer games industry. The speakers remarked that a demo program was almost essential to procuring a job for graduates. The demo should be complex, but not so complex that it would take up all of your time.

One of the speakers gave us an example; a basic spinning cube would be too simple, but a forest, or, even better, a spinning forest, would be something that they would consider. My demo program creates a single tree, rather than a whole forest; however you'll note that my tree is indeed spinning, which I hope counts for something ;)