rigid body simulator screenshot

So far, I have collision detection, collision response and rendering done for arbitrary convex shapes (rotations are also implemented, using quaternions for stability).

I started out with the bisection method, but once the objects come to rest on a surface, or when many objects are intersecting, the recursive ODE solver calls (by the bisection method) just kill off the speed of this approach.

That's why i converted my code to a pure- ly impulse-based approach. the classic impulse-based algorithms, do experience the 'bouncing' effect though. I have found a novel algorithm by Guendelmann, Bridson and Fedkiw, that specifically deals with this problem. The paper is called "Nonconvex rigid bodies with stacking" and was presented at SIGGRAPH 2003.

Here are some video's of my implementation, you will need the xvid codec to see the ones with '-xvid' suffix (Update: I've put additional wmv avi's available,as people were having problems with the XVIDs):

And the cream of the crop, watch me potting several balls in one shot in the pool break movie (with a fair amount of power). Go along with the camera and discover what happends to balls when they disappear into the pocketholes. (hint: they aren't eaten by the underground cookie-monster :-) )

Here's one before i implemented contact resolution, it still has the 'hopping and bouncing' effect:

and the code can be downloaded here:

I am using SWIFT for collision detection, but i have also implemented experiments in the same setting (or in the bisection) setting, with other collision detection algorithms, ao. PQP, SWIFT++, G3D::CollisionDetection, DEEP.

Although SWIFT gives very few contact points (in general only one per pair of closeby objects), it does give you good information for collision and contact response (such as contact point location and world- space normals). Moreover, it is an n-body processor, with a broad phase algorithm (using axis- aligned bounding boxes), which is also very helpful to keep the algorithm speedy.