Graphical Input and Output
In its current state, the program ogltest.cpp displays a 3 dimensional tree derived from a hard-coded string representation, using GLUT (OpenGL Utility Toolkit) libraries. The displaytree function needs a global variable that stores the root of the tree to be drawn, an ugly aspect that was necessitated by the way the display functions are called using OpenGL. The tree's third dimensional links are represented in green, the second dimensional links are represented in red and the first dimensional links are represented in black. The tree can be rotated fully to view it from any angle or animated to spin. The drawing algorithm has some "pretty print" functionality to it, and tries to draw branches of the tree based on the number and size of subtrees.

| CS Home | Earlham College | WebDB | Earlham Mail | Earlham Libraries | Word Online |
Copyright © 1996-2002 by Earlham College Computer Science Department.
If you're curious about why we copyright, see
Peter Suber's
Why Copyright Web Documents?.

Last updated: Monday, 26-Jul-2004 14:22:53 EST
#534