math C/C++ libraries, underfoot, get it out of my head. From an old project, occasionally useful, lots of fun geometric parts. This plus a graphics API gives you a video game.