Lev's personal webpage

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.

Screenshots:

Filed under: Programs Comments Off

Rijik is evil!

Undeniable proof that my cat is evil (to strangers, mostly).

Filed under: Cats Comments Off

Rijik and Stesha playing with catnip

As promised, here is the first post in the "Rijik" series.  First up is a recent photo of my cat Rijik (the white one), and his neutered fat girlfriend/wife Stesha.  They are just hanging out on my carpet after rubbing their faces in a bunch of catnip.  Enjoy!

Filed under: Cats Comments Off

Hello World!

This is the first post of my new webpage/blog.   I will proceed to post regularly (hopefully) about various stuff like my opinions (they are the only ones that don't stink), my programs and my cat Rijik.

Hopefully this will turn out better than the last attempt.