/ Elastic Billiard Simulator
JA EN ZH
Back
Contact Mechanics Simulator

Elastic Billiard Ball
Collision Simulator

Set the restitution coefficient, gravity, and friction, then drag-and-release to launch balls. Watch momentum conserve (or dissipate) across collisions — the same physics that underpins DEM simulations of granular materials.

Drag to launch Restitution 0–1 Gravity toggle DEM fundamentals

Drag on canvas to aim, release to fire — touch supported

Mode Presets
Parameters
Restitution e0.98
Gravity g (m/s²)0.0
Friction0.00
Ball radius20
Visualization
Statistics
Kinetic Energy
0
Collisions
0
Ball Count
0
FPS
--
Actions

Theory: Elastic Collisions and Restitution

Ball-Ball Velocity Update

For two equal-mass balls, the impulse along the collision normal n̂ (unit vector from ball 1 center to ball 2 center) gives the velocity update:

v₁_new = v₁ − (1+e)/2 · [(v₁−v₂)·n̂] · n̂
v₂_new = v₂ + (1+e)/2 · [(v₁−v₂)·n̂] · n̂

With e=1 (perfectly elastic), kinetic energy is fully conserved and velocity components are exchanged. With e=0 (perfectly inelastic), the normal relative velocity becomes zero after impact.

Wall Reflection

The normal velocity component at a wall is negated and multiplied by e. With friction enabled, the tangential velocity is also attenuated proportionally.

Path to DEM

This simulator's contact model is the basis of the Discrete Element Method (DEM). Industrial DEM solvers extend it with Hertz contact stiffness, rolling friction, and inter-particle adhesion to model powder compaction, rock crushing, granular flow, and tablet manufacturing — all starting from the same collision equations shown here.

💬 Is the coefficient of restitution really that simple?

🧑‍🎓
If I set e=1, the balls bounce forever without losing energy, right? That means kinetic energy is perfectly conserved?
🎓
In the simulator, yes. But in reality e is always less than 1. Even a polished steel ball has e≈0.85–0.92 because some energy leaks into sound and micro-deformation at the contact point. e=1 is a useful idealization, not a physical reality.
🧑‍🎓
Then the "sticky" mode with e=0.1 — does that mean the balls practically glue together after hitting?
🎓
They don't literally fuse, but the normal separation velocity is reduced to just 10% of the approach speed, so they barely bounce apart. This is the starting point for cohesive particle models in DEM — add an adhesion term and you can simulate wet granules clumping together, like in pharmaceutical granulation processes.
🧑‍🎓
The dotted trajectory preview when dragging — is that doing real physics calculations?
🎓
Exactly. The drag vector is converted to an initial velocity, then the simulator integrates the equations of motion forward for a short time to project the path. It's the same technique used in game engines for trajectory ghosts — popularized by games like Angry Birds — and it's genuinely useful in engineering for pre-visualizing projectile impact points.

What is Momentum in Collisions?

🧑‍🎓
What exactly is "momentum" in a collision? Is it just how fast the ball is moving?
🎓
Basically, momentum is mass *in motion*. It's not just speed ($v$), but also the object's mass ($m$). The formula is $p = m v$. In practice, a slow-moving bowling ball has more momentum than a fast-moving ping-pong ball because of its larger mass. Try dragging and launching balls of different sizes in the simulator above—you'll see the heavier ones are much harder to stop.
🧑‍🎓
Wait, really? So in a perfect collision, is momentum just passed from one ball to another?
🎓
Exactly! That's the law of conservation of momentum. In a closed system, the total momentum before a collision equals the total momentum after. But here's the catch: energy is a different story. Try setting the "Restitution" slider to 1.0 for a perfectly elastic collision—both momentum and kinetic energy are conserved. Now slide it down to 0.5. Momentum is still conserved, but kinetic energy is lost (converted to heat/sound), which is what happens in most real-world collisions.
🧑‍🎓
That makes sense. But what do the "Friction" and "Gravity" sliders actually change in the physics?
🎓
Great question! They affect the forces outside the instant of collision. Gravity pulls balls downward, adding a vertical component to their velocity between bounces. Friction with the table surface continuously robs the balls of speed as they roll. In the simulator, turn gravity up and friction to zero—you'll get parabolic arcs like a projectile. Then crank up the friction and see how quickly the balls slow down, modeling a rough surface. These forces change the momentum the balls have when they eventually collide.

Physical Model & Key Equations

The core principle governing all interactions in this simulator is the conservation of linear momentum for a system of particles. For a collision between two balls, the total momentum before impact equals the total momentum after impact.

$$ m_1 \vec{v}_{1i}+ m_2 \vec{v}_{2i}= m_1 \vec{v}_{1f}+ m_2 \vec{v}_{2f}$$

Here, $m$ is mass, $\vec{v}_i$ is initial velocity, and $\vec{v}_f$ is final velocity. This vector equation holds true regardless of the type of collision (elastic or inelastic).

To determine the final velocities, we need a second condition that describes the elasticity of the collision, defined by the coefficient of restitution (COR).

$$ e = \frac{v_{2f}- v_{1f}}{v_{1i}- v_{2i}} $$

The COR ($e$) is the slider labeled "Restitution." $e=1$ is a perfectly elastic collision (kinetic energy conserved). $e=0$ is perfectly inelastic (objects stick together). Values between 0 and 1 model real-world, partially bouncy collisions where some kinetic energy is lost.

Real-World Applications

Vehicle Crash Testing & Safety Design: CAE software uses these exact momentum and restitution principles to simulate car crashes. Engineers adjust the "effective restitution" of crumple zones to manage the transfer of momentum to the passenger cabin, optimizing designs for safety long before building a physical prototype.

Sports Equipment Design: The performance of golf balls, tennis balls, and basketballs is critically dependent on their coefficient of restitution. Designers simulate collisions at different speeds and angles to perfect bounce consistency and energy transfer, much like adjusting the slider in this tool.

Robotics & Automation: Robotic arms that handle and sort items on a conveyor belt must account for collisions. Simulating the momentum transfer with friction and restitution helps program gentle, precise handling to prevent damage to products.

Planetary Science & Orbital Mechanics: The "gravity" and collision modeling here is a 2D simplification of n-body problems. Scientists use advanced versions of these principles to simulate asteroid collisions, moon formation, and spacecraft docking maneuvers, where conserving momentum is fundamental.