Drag the leather pouch back, release, and knock the towers down. A hand-written 3D rigid-body solver (friction, restitution, stacking, sleeping, fracture) runs every block; the launch is Hooke's law plus energy conservation. Unlike orbital gravity-slingshot labs this is an elastic-band catapult, and unlike the existing balance-tower and tower-collapse pages it adds a launcher, impulse-driven fracture and an energy ledger.
The science (equations, simplifications, checks)
Elastic band. A stretched band stores energy. For a Hooke band F = k s, the energy is U = ½ k x². Rubber stiffens at large stretch, so the optional model is F = k s (1 + β (s/xref)²) with U = ½ k x² + β k x⁴ / (4 xref²). The band is released through a time integration (RK4) of
m_eff s'' = -(1 - L) F(s), s(0) = x, s'(0) = 0
m_eff = m + m_band / 3 (a band stretched linearly carries 1/3 of its mass
as kinetic energy: integral of (1/2) (m_b/l)(v s/l)^2 ds = m_b v^2 / 6)
v = x sqrt( (1 - L) k / m_eff ) (linear band; general: v = sqrt(2 (1 - L) U / m_eff))
L is a hysteresis loss (default 5 %): rubber returns less energy than it stored. The ball leaves the pouch when the band is slack, at the rest point of the band. Gravity during the 0.03 s release is neglected. The toy scale is deliberate: balls have radius 0.25 m, so a 60 kg rubber ball at 25 m/s carries about 19 kJ. Numbers are those of a giant catapult-toy, not a hand-held slingshot.
Flight. The ball obeys m a = m g - ½ ρ Cd A |v| v with Cd = 0.47 (sphere, no spin, no Magnus effect). Without drag the path is a parabola y = y0 + x tanθ - g x² / (2 v² cos²θ), and the range from level ground is v² sin 2θ / g. The dotted preview integrates the same law.
Rigid bodies. Boxes, 16-sided barrel prisms and spheres are integrated with sequential impulses (12 iterations, warm starting, Baumgarte 0.2 with 4 mm slop) at 120 Hz with extra substeps while a ball is fast, so it cannot tunnel through a 0.1 m slab. Convex-convex contacts come from the separating-axis test (3+3 face axes and edge-edge axes for boxes) and clipping of the incident face against the reference face (up to 4 points). Friction is Coulomb with the geometric mean of the two materials' coefficients, clamped inside a circular cone: |jt| ≤ μ jn. Restitution e = max(e1, e2) applies above 1 m/s approach speed. Bodies whose island moves slower than 0.1 m/s for 0.5 s fall asleep, which keeps hundreds of blocks at 60 fps.
block density friction e breaks when impulse/m exceeds
wood 600 0.55 0.15 13 m/s
stone 2400 0.65 0.08 30 m/s
glass 2500 0.32 0.25 6.5 m/s
ice 920 0.14 0.15 8.5 m/s
Fracture. Real fracture depends on flaws, size and loading rate. Here a block breaks when the largest normal impulse on it in one step, divided by its mass (an equivalent velocity change Δv), exceeds the material limit; it is then replaced by 2, 4 or (glass) up to 8 pre-cut sub-boxes with the same velocity field, so mass, momentum and kinetic energy are conserved at the instant of breaking. Pieces are 1.45x stronger per generation, two generations at most. This is a game model, not a fracture-mechanics simulation: no crack paths, no strain-rate effects.
Energy ledger. The graph tracks KE (translation + rotation of every moving body), potential energy relative to the release, and dissipated = delivered - KE - ΔPE. Dissipation is friction, inelastic impacts, fracture and air drag; the splitting ball's internal spring adds a small known amount.
Splitting ball. Tap Split in flight: the ball becomes three equal balls (mass m/3 each, radius r/31/3) with sideways speeds of 3.5 m/s at 120 degrees to each other, so the total momentum is unchanged. It is a mechanical toy; there is no explosive of any kind.
Checks built into this page. (1) Experiment 1 compares the RK4 band release and the speed measured in the rigid-body world with the closed form x sqrt((1-L)k/m_eff). (2) Experiment 2 compares the simulated drag-free range with v² sin 2θ/g (error below 0.1 %). (3) Experiment 3 stacks 20 boxes for 10 s (they stay up) and finds the tilt at which a 4-box column topples by bisection, against the centre-of-mass criterion tanθ = w/h (tilt is applied by rotating the gravity vector, equivalent to an inclined plane with enough friction not to slide). Because the column is separate blocks that can shear, the measured angle sits a little below the ideal value.
Replay re-runs the stored world state (including cached contact impulses) with a fixed time step, so it reproduces the shot exactly in slow motion. Inanimate targets only: no people, animals or weapons.