Presets
Playback
Cradle
Number of balls, string length, ball size and the gap between resting balls.
Lift
How many balls you lift on each side and how far. You can also drag a ball on the canvas.
Material and losses
Material sets density, restitution and stiffness. Restitution below 1 loses energy in every impact.
World and clock
Try other planets: the period changes with sqrt(L/g).
Layers
Model checks
The science
What happens when you lift balls
Each ball hangs from two strings (so it swings in one plane). A lifted ball falls, turns its height into speed, hits the next ball and passes its momentum along the line of touching balls. The same number of balls leaves on the far side. Lift two and two swing out, lift three and three swing out.
1. Pendulum motion
Every ball is a pendulum with string length L (to the ball centre): θ'' = -(g/L) sin θ - b θ'. The exact period for a release angle θ0 is T = 4 √(L/g) K(sin θ0/2) = 2π √(L/g) / AGM(1, cos θ0/2), which is longer than the small-angle value 2π√(L/g). Model check 1 compares a simulated free pendulum with this formula.
2. Energy and speed at the bottom
Released from θ0 a ball reaches v = √(2 g L (1 - cos θ0)) at the bottom, independent of its mass. Kinetic energy ½ m v² comes from gravitational potential energy m g L (1 - cos θ). The energy graph shows the exchange.
3. Why the pattern is "n in, n out"
The balls touch through a Hertz contact: the force grows as F = k δ3/2 with the overlap δ, and acts for only a few hundred microseconds. For two equal balls with an ideal contact both momentum m v and kinetic energy ½ m v² are conserved only if the first ball stops and the second leaves with v: velocities swap. Along a chain the compression wave runs through the middle balls, so the far ball leaves almost at full speed and the middle balls barely move. Two unknowns (the speeds after the collision) need two conservation laws (momentum and energy), which is why exactly n balls leave. One ball cannot be shot out faster in a way that also lets two leave slower: the pair 2 m v/2 has the same momentum but only half the energy.
4. Contact time and the Hunt-Crossley loss
For equal balls hitting at relative speed v: maximum overlap δmax = (5 μ v² / 4 k)2/5 with reduced mass μ = m/2, and duration ≈ 2.943 δmax / v. Model checks 2 and 3 test momentum, energy, the velocity swap and this duration on a separate two-ball model. Losses are added with the Hunt-Crossley term F = k δ3/2(1 + 1.5(1 - e) δ'/v0), where e is the restitution.
5. Why it stops
Each impact loses a little energy (restitution below 1: sound, heat, small vibration) and the strings and air add damping b. The middle balls keep a small residual motion that slowly grows until the swing fades. Heavier or lighter end balls, gaps between balls and soft materials break the simple pattern, as the presets show.
Honest simplifications
Balls swing in one vertical plane with rigid, massless strings; contact is along the line of centres with no friction or rotation; the Hertz stiffness is softened (default 1e8 N/m3/2 instead of about 1e10 for real steel) so that impacts last a visible fraction of a millisecond and the integrator (10 microsecond fixed step) stays stable. Contact times are therefore longer than real steel, while momentum, energy and the n-in-n-out pattern are unaffected. Horizontal momentum of the whole chain is only conserved during impacts, because the strings also pull on the balls. Ball radius default 12.7 mm (half-inch steel).
What to try
- Lift 1, 2, 3 balls and count how many leave on the other side.
- Open a 1.5 mm gap between the balls: each pair collides separately and the clean pattern is lost.
- Set the last ball to 3x mass: it moves slowly while the lighter balls rebound.
- Choose Hard rubber or Wood and watch the energy graph fall quickly.
- Go to the Moon: the period grows by √6.
- Drag any ball with the mouse or your finger and let go.