Rigid-body physics using particles

Towards the end of last year, I worked on a prototype physics engine based on a GPU Gems chapter --- a realtime physics simulation running on the GPU. So far I've only written it for the CPU as I've never done any GPU work before. (judging by the problems I've had with the physics side of things, it was probably a good idea not to heap on an order of magnitude more GPU problems...)

Here's a video of it in action:

After I managed to get rotation pretty much working' --- it still does odd things --- it worked pretty well. It's operating on the pixel/metre scale, because I was lazy... so everything here is massive skyscraper-sized entities. Quite by accident, it appears to have 'conservation of momentum' --- if I draw a 'C', and fill it with particles it will accelerate like a ~rocket~ snail.

Eventually, I'll work out how to port it to GPU, hook it up with OpenGL, and make it 3D... but that'll be a while.

In the meanwhile, read the code at Github, and... I've not got the build properly set up on Jenkins so you can't download it.

EDIT: another video from some time later: