Elastic Collision Simulator

JJ Ben-Joseph headshot JJ Ben-Joseph

What this simulator calculates

This page models a one‑dimensional, perfectly elastic collision between two blocks (or carts) moving along a straight line. You enter each block’s mass and initial velocity, then the simulator computes the post‑collision velocities using conservation laws and animates the motion. It also tracks kinetic energy over time and can export the time series to CSV.

How to use

  1. Enter m₁, v₁, m₂, v₂ (SI units: kg and m/s).
  2. Choose the time step Δt (smaller = smoother/more accurate; larger = faster but less precise).
  3. Press Play to start the animation; use Pause and Reset as needed.
  4. Use CSV to download the recorded time series (positions, velocities, and energies if included by the implementation).

Variables, sign convention, and assumptions

The model assumes two rigid bodies moving on a frictionless line. The collision is instantaneous and perfectly elastic, meaning:

Governing formulas (perfectly elastic, 1D)

Conservation of momentum:

m1v1 + m2v2 = m1v1 + m2v2

Conservation of kinetic energy:

12m1v12 + 12m2v22 = 12m1v12 + 12m2v22

Solving these yields the standard closed‑form results:

Interpreting the results

Kinetic energy for each block is:

KEᵢ = ½·mᵢ·vᵢ²

In a perfectly elastic collision, total kinetic energy and total momentum stay constant. In the simulator, you may see tiny drift due to finite time steps and discrete collision handling.

Worked example

Using the default values shown on the page: m₁ = 1 kg, v₁ = 2 m/s, m₂ = 1 kg, v₂ = −1 m/s.

Because the masses are equal, they exchange velocities:

Check momentum: initial p = 1·2 + 1·(−1) = 1; final p = 1·(−1) + 1·2 = 1. Check energy: initial KE = ½·1·2² + ½·1·(−1)² = 2 + 0.5 = 2.5 J; final KE = ½·1·(−1)² + ½·1·2² = 0.5 + 2 = 2.5 J.

Quick comparison (elastic vs inelastic)

Collision type Momentum conserved? Kinetic energy conserved? Typical outcome (1D)
Perfectly elastic Yes Yes Objects bounce; speeds adjust to conserve both laws
Inelastic (not sticking) Yes (if isolated) No Some kinetic energy becomes heat/sound/deformation
Perfectly inelastic (sticking) Yes (if isolated) No (maximum loss) Objects leave together with a shared velocity

Numerical scheme (why Δt matters)

The animation advances time in increments of Δt. Between collisions, each block moves at constant velocity, so positions are updated using a simple step:

xᵢ(t + Δt) = xᵢ(t) + vᵢ·Δt

When the blocks overlap or their edges cross between steps, the simulator triggers a collision response and replaces the velocities with v′₁ and v′₂. Smaller Δt usually reduces visible jitter and improves conservation behavior in the recorded data, at the cost of more steps.

Assumptions & limitations

Inputs
Enter masses and velocities then press Play.
Simulation summary will appear here.

Block 1 kinetic energy

Block 2 kinetic energy

🎮 Block Buster Physics Mini-Game

Experience elastic collisions in action! Break blocks with realistic momentum transfer.

Block Buster Physics

Break blocks using real elastic collision physics!

Each block has a different mass — feel the momentum transfer.

Click to Play

Game Over!

0
Best: 0
Notice how lighter blocks sent the ball flying back faster, while heavy blocks barely budged it? That's elastic collision momentum transfer — when masses differ greatly, the lighter object rebounds with much higher velocity! The formula governing this: v' = (m₁ - m₂)/(m₁ + m₂) × v₁ + 2m₂/(m₁ + m₂) × v₂

Embed this calculator

Copy and paste the HTML below to add the Elastic Collision Simulator with Energy Tracking to your website.