Implementation of fast frictional dynamics for rigid bodies

This sketch will present some important details that went into the implementation of our Fast Frictional Dynamics algorithm [Kaufman et al. 2005]. Our goal is the fast simulation of large sets of non-convex rigid bodies. By avoiding repeated pairwise comparisons between bodies, we are able to formulate a multi-body simulation algorithm with a complexity that is linear in the total number of contacts per time step. We employ a velocity-level treatment of contact resolution. For each rigid body, we consider the mass, location, and velocity of multiple contacts, with multiple bodies, at the time of maximum compression of each contact. This allows each body to receive the appropriate amount of imparted momentum from the collisions in which it is involved. We use a Quadratic Program (QP) to tell us which contacts are the most active, and to obtain the effective normal impulse generated by them. Because this impulse combines the contributions of all active contacts, we are able to get good frictional behavior, at low cost, using a new Coulomb-like friction model that requires a single additional QP. Our algorithm can be combined with a wide variety of broadand narrow-phase collision detection systems. We have employed an off the shelf narrow-phase system (PQP [Gottschalk et al. 1996]) and implemented a simple spatial hash table for our broad-phase. More efficient collision detectors could be seamlessly swapped into our implementation. We have implemented our simulation using fixed size time stepping (although there is no reason an adaptive stepping approach could not be used). At each step we advance the state of all rigid bodies in our system. Individual steps can be conceptually partitioned into the following five phases: An initial forward Euler halfstep for all bodies, broad phase collision detection, contact point determination between colliding bodies, resolution of all contacts on all bodies, and a final forward Euler half-step for all bodies.