Patent ID: 8223155

Claim:
A method for use in computer graphics, comprising: receiving data representative of a plurality of particles; for pairs of particles that will collide with each other, calculating a time at which the collision will occur based on a current trajectory of the particle pair; and for pairs of particles that will collide with each other, calculating the collision impulse to each particle resulting from the collision with the other particle by calculating the angle of reflection and change in velocity for each particle resulting from the collision; and for pairs of particles that will collide with each other, applying this collision impulse to each particle prior to the collision to adjust each particle's direction and velocity such that the relative positions of the two particles of each pair are different than they would be if they had collided; for particles in static contact, moving at least one particle to allow movement of a second particle to a static position, sorting the particles using a topological sort, and applying inelastic collision impulses to at least some of the particles; and for particles in static contact that had inelastic collision impulses applied, treating the particles as having infinite mass during future collisions occurring during a time step by assigning a parameter to the particles indicating that the particles are not permitted to move when contacted by other particles.