Ported physics demo from Chris Hecker's website.