Description

The program is a simple pool table simulation. There are four normal balls on the table and the cue ball (which is the bright red one). Balls collide and bounce physically as far as linear momentum is concerned. With rotation, I simply made the ball rotate based on how fast it was moving, but could seem to get something that looked quite realistic enough.
The controls for the table are pretty simple, the mouse (and on backup, the arrow keys) control the view. While holding the left mouse button, up/down with the mouse tilts the view, and left/right swivels the camera around the table. Hold the right mouse button and moving the mouse up/down zooms in and out. You can press 'q' to give all of the balls a random velocity. 's' causes the cue ball to shoot in the direction the camera is facing. Finally, 1 and 2 toggle the lights on and off.

About the Design

I originally wanted to have a full game with menus and sound, later realizing that with time constraints, that would not be possible. So, I cut bits here and there until I came down to having a few balls bouncing around the table and off of each other. I had also wanted to add rotations but that would have added a whole lot more work to it, so I decided to go with the not-so-realisitic pseudo-rotations where I just changed the amount the ball was rotated based upon the balls linear velocity.
The linear equations were taken from 'Physics for Game Developers' By David M. Bourg on page 96. I also used some articles on gamasutra.com to get and idea of how far I wanted to go with the physics on this.
I made the table up by hand, building pieces up and the putting those together to form Voltron-- err -- the final table. The balls are generated by me since the glut framework spheres give normals but no texture coordinates.

The End?

This has been a pretty fun project to make, I'm thinking I'll take the basic framework and make it into a real game like I originally planned later on. Until then though, this is the finished product.

- Jeff