This visualisation gives the distance-time diagram showing all the collisions that happen between a system of three particles (colliding directly on a smooth surface, with coefficient of restitution 1). Initially two of the particles are at rest, and the third is projected toward the others. You can alter the masses of the objects, their initial positions, and the initial speed of the moving particle.