The ball has mass m = 1 kg. Its gravitational potential energy relative to the floor is Ep = mgh, and its kinetic energy is Ek = ½m|v|². While airborne, no energy leaves the system: Ep and Ek trade places continuously and Ep + Ek stays constant, exactly the first law ΔE = Q + W with Q = W = 0.
Ep = m·g·h Ek = ½·m·v²
Impact: v_after = e · v_before (normal/vertical component)
v_after = (1-μ) · v_before (tangential/horizontal component)
Heat generated per bounce:
ΔQ = ½m·v_before² − ½m·v_after²
Every time the ball hits the floor, the restitution coefficient e (0<e<1) shrinks the rebound speed along the vertical impact normal, and the friction coefficient μ shaves off part of the horizontal speed. Both losses are real: the kinetic energy that vanishes from the mechanical budget is added, bounce by bounce, to a running heat counter Q — representing the sound, deformation and micro-friction that actually warm the ball and floor on contact.
- Drop height / gravity — set the initial potential energy, part of the total energy budget for the whole run.
- Restitution e — how much vertical kinetic energy survives each bounce; e → 1 is a perfectly elastic (bouncy) collision, e → 0 is nearly dead.
- Floor friction μ — how much horizontal speed is scrubbed off on contact, feeding the same heat counter.
The energy bar always sums to 100% of the ball's true starting energy budget E₀: watch the red "heat" segment grow and the ball's bounces get shorter and lower — mechanical energy is not disappearing, it is becoming heat, exactly as ΔE = Q + W predicts.
Note on this 2D build: the original 3D version defines its energy-bar denominator as E₀ = mgh₀ alone, which quietly ignores the sideways kinetic energy the ball is seeded with at the drop (it launches with a small horizontal velocity, not zero). That leaves its own bar summing to about 103–104% right after the drop instead of exactly 100%, contradicting its own claim above. This 2D rebuild fixes it: E₀ = mgh₀ + ½m·vx0² — the ball's true total mechanical energy at the moment of release — so KE + PE + Q sums to exactly 100% at every instant, including t = 0.
Drag the view to pan and scroll to zoom.