Create your own personal IM “cloud”!
Recently I have gotten around to purchasing my own VPS - Virtual Private Server. I did it because I wanted to have a server with root access on a pretty fast and reliable connection that I could use remotely from everywhere. One of the more useful things I have found to do on it is to run a chat client that I can use remotely from either web interface or SSH. What follows below is a high level description and instructions on how to setup your own IM "cloud"!
Treebe Universe!
Treebe is a program I have made a while ago, sometime in 2006, for a computer graphics class. I was learning OpenGL and relative coordinate system, so as an exercise I decided to write a screen-saver type program that would display a lot of objects in a recursive pattern utilizing relative coordinates via OpenGL's modelview matrix stack. I chose a pretty basic pattern of a parent object surrounded by 6 smaller children on each side. By changing relative position between parent and children I added animation.
I have also created a simple polymorphic scene-graph API to make the code more generalized and somewhat elegant. This scene graph is actually a tree (here is where Treebe name originated) where each child inherits from a base class - ANode, that represents a node in the scene. ANode has enough information to link to children and to describe their relative size, position and rotation to the parent. It also has a field for a display list (which made displaying lots of object a LOT faster) and a default virtual render() method that calls display list (unless it is overridden by a child class).
Simple pre-order traversal of the tree (call render() of each node before going to children) renders the whole scene. To animate Treebe specifically I only needed to make another tree traversal function that added same offset to each node which is a sinusoidal function (thus the whole thing expands and shrinks). As you can see from screenshot, several geometric objects can be used for each node which is done by another traversal that sets the display list id for each node. By twiddling with the default relative size of child to parent it is also possible to achieve different looking "orbits" (as example compare 2nd and 3rd screenshots).
Windows executable download
Controls:
1-8 | Change display list. |
q, e | Increase/decrease relative scale between parents and children. |
-, shift + | Decrease/increase recursion depth. |
space | Pause animation. Press again to step through it. |
n | Continue animation. |