Collision Response

11.Collisions

Bounce a particle off a surface. Understand restitution as the bounciness knob.

§RRead

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.

§TTry

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.

fig. 11-1
restitution:0.80
pos:
vel:
change values, then Reset
fig. 11-1 — bounce-box — particle + restitution slider
§PPredict

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.

§VVerify

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.

fig. 11-2
restitution:0.80
pos:
vel:
change values, then Reset
fig. 11-2 — bounce-box — compare restitution values
§MModify

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.

fig. 11-3
restitution:0.80
pos:
vel:
change values, then Reset
fig. 11-3 — bounce-box — angular bouncing with trail
Checkpoint

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.