1. What is Nonpenetration Constraints? When dealing with rigid bodies, no inter-penetration between objects are allowed. This means that at the instant that the particle actually comes into contact with the floor, there is abrupt change of the velocity of the particle. 2. Main problems with Nonpenetration Constraints? 2.1 Computing velocity changes for colliding contact When two bodies are in contact at some point, and they have a velocity towards each other, we call this colliding contact. Colliding contact requires an instantaneous change in velocity. However, the numerical routines that solve ODE¡¯s assume that the state X(t), including velocity, always varies smoothly. Clearly, requiring X(t) to change discontinuously when a collision occurs violates that assumption. If a collision occurs at time tc, we tell the ODE solver to stop. We then take the state at this time, X(tc), and compute how the velocities of bodies involved in the collision must change. We'll call the state reflecting these new velocities X(tc)+. Note that X(tc) and X(tc)+ agree for all spatial variables (position and orientation), but will be different for the velocity variables of bodies involved in the collision at time tc. We then restart the numerical solver, with the new state X(tc), and instruct it to simulate forward from time tc. 2.2 Computing the contact forces that prevent inter-penetration. Whenever bodies are resting on one another at some point p, we say that the bodies are in resting contact. In this case, we compute a force that prevents the particle from accelerating downwards; essentially, this force is the weight of the particle due to gravity (or whatever other external forces push on the particle). We call the force between the particle and the floor a contact force. Resting contact clearly doesn¡¯t require us to stop and restart the ODE solve at every instant; from the ODE solver¡¯s point of view, contact forces are just a part of the force returned by ComputeForceAndTorque. 3. Other problems 3.1 Collision detection The collision detection algorithm begins with a preprocessing step, in which a bounding box for each rigid body is computed. Given n such bounding boxes, we will want to quickly determine all pairs of bounding boxes that overlap. Any pair of rigid bodies whose bounding boxes do not overlap need not be considered any further. Pairs of rigid bodies whose bounding boxes do overlap require further consideration by checking for inter-penetration or contact points between rigid bodies defined as convex polyhedra.