I'm writing an OpenGL 3D screensaver that will bounce off the sides of the screen traveling at different angles and on the Z axis as well.

The factors involved are:
X, Y, Z, angle, velocity, time
and maybe I missed some.

How would I go about calculating all of those factors?