Bounce = reflect velocity, scale by restitution.
When a particle hits a wall, we reflect the velocity component perpendicular to the wall and multiply it by the coefficient of restitution. Restitution = 1 means a perfect bounce (no energy lost). Restitution = 0 means the particle sticks. Real materials are between 0.3 and 0.9.
That is the entire collision model for a particle in a box. Real engines extend this to arbitrary shapes, but the core idea — reflect and scale — remains.
Drop a ball in a box.
The particle below falls under gravity inside a walled box. Adjust the restitution slider and watch how quickly it settles.
At what restitution does it stop after one bounce?
If you set restitution very low (say 0.1), the ball barely bounces at all. What value makes it visually "dead" after the first impact?
Reveal
Below about 0.15, the bounce height after one impact is so small it is barely visible. At 0.0, there is no bounce at all — the ball sticks on contact.
Test the prediction.
Set restitution to 0.9, then 0.5, then 0.1. Watch the energy bleed out faster with lower restitution. Reset between tests.
Angle the trajectory.
Challenge: The ball starts with horizontal and vertical velocity. With restitution at 0.7, can you predict where it will be after 5 bounces? Press play and count. The trail makes the bounces visible.
You understand collision response: reflect velocity, scale by restitution. Combined with Euler integration and forces, you now have every primitive needed for the capstone. Mark complete.