/ 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
Billiards

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

Mode Presets
Parameters
Restitution e
Gravity g (m/s²)
m/s²
Friction
Ball radius
px
Visualization
Statistics
Results
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.

Frequently Asked Questions

When the coefficient of restitution is 0, balls will not bounce upon colliding with each other or walls, but will instead stop as if sticking together. This simulates a perfectly inelastic collision, where all kinetic energy is dissipated. The effects of friction and gravity are reflected separately.
Increasing friction makes the balls less likely to slide when in contact with the arena floor or walls, causing them to decelerate while rotating. The change in velocity after collisions also becomes smaller, reproducing a rubbing motion between balls. This behavior approaches that of powders or sand.
This tool implements a simplified version of the basic DEM algorithm and does not include detailed contact models (such as Hertz theory or friction torque) found in industrial CAE. However, it follows the same principles of momentum conservation and energy dissipation, making it effective as an introductory experience to DEM.
In the drag operation, the direction and initial velocity of the shot are determined by the direction and distance you drag the mouse. To aim accurately, predict the reflection angle of the target ball or wall, and slowly drag to make fine adjustments for better precision. Also consider that a higher coefficient of restitution results in stronger rebounds.

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.

Common Misconceptions and Points of Caution

Model assumptions: The mathematical model used here relies on simplifying assumptions such as linearity, homogeneity, and isotropy. Always verify that your real system satisfies these assumptions before applying results directly to design decisions.

Units and scale: Many calculation errors arise from unit conversion mistakes or order-of-magnitude errors. Pay close attention to the units shown next to each parameter input.

Validating results: Always sanity-check simulator output against physical intuition or hand calculations. If a result seems unexpected, review your input parameters or verify with an independent method.

How to Use

  1. Set coefficient of restitution (e) between 0.8–1.0 using the slider; 1.0 simulates perfectly elastic collisions with complete energy recovery
  2. Adjust gravitational acceleration (g) from 0–10 m/s² to model different environments or disable gravity entirely
  3. Configure friction coefficient (0–0.3) to reduce ball rolling distance; higher friction increases energy dissipation per meter traveled
  4. Set ball radius (20–60 mm) affecting rotational inertia and collision impact zones
  5. Click and drag a ball to define launch velocity, then release to initiate collision sequence

Worked Example

Cue ball (40 mm diameter, density 1600 kg/m³) strikes stationary object ball at 3 m/s on a pool table with e=0.95, g=9.81 m/s², friction=0.15. Post-collision cue ball velocity: 0.24 m/s (forward), object ball velocity: 2.85 m/s. With friction acting over 2 meters, object ball stops after traveling 1.89 m. Reducing e to 0.85 decreases object ball exit velocity to 2.71 m/s, stopping after 1.72 m.

Practical Notes

  1. Professional tournament balls use e≈0.95; recreational tables often 0.85–0.90 due to wear and felt compression
  2. Microgravity simulation (g=0) reveals pure momentum conservation without gravitational influence on trajectory curvature
  3. Friction coefficients vary: polished slate tables ~0.08, worn cloth ~0.25; adjust to match surface conditions
  4. Spin effects from off-center strikes emerge naturally when collision point distance from center exceeds zero; watch angular momentum transfer