A medieval siege engine treated as a double pendulum. Drop the counterweight, whip the stone out of the sling at the right instant, and watch hundreds of rigid stone blocks respond. Inanimate stone and wood only: this is classical mechanics.
The science (equations, sources, honest simplifications)
The machine is a planar mechanism with generalised coordinates q = (θ, φ) for a fixed counterweight, or (θ, φ, χ) when the counterweight hangs from a hinge. θ is the angle of the long arm from the horizontal, φ the angle of the sling, χ the angle of the counterweight hanger. Lagrange's equations are solved with a fourth-order Runge-Kutta step (dt = 0.5 ms):
T = 1/2 q'^T M(q) q' V = g sum m_i y_i
d/dt(dT/dq'_k) - dT/dq_k = -dV/dq_k
M q'' = -(dM/dq) q' q' + 1/2 q'^T (dM/dq_k) q' - grad V
Bodies: uniform beam (mass m_b, length L1+L2, pivot off-centre), counterweight M as a point mass with the inertia of a cube, stone m on a massless rigid sling of length Ls. The stone starts lying on the ground in front of the arm tip and slides back along the ground (frictionless, unilateral contact) until the sling lifts it. The sling is assumed taut; the lab reports the minimum sling tension and warns if it would go slack.
Release. The sling loop slips off a pin on the arm tip when the angle between the sling and the arm line falls to the pin angle β. A large β releases early (the stone lobs backwards or low), a small or negative β releases late (the stone is thrown into the ground). Between them lies a maximum of range, found here by sweeping β over a single swing, because every instant of the swing is a candidate release moment.
Efficiency = kinetic energy of the stone at release / (M g Δh), where Δh is the drop of the counterweight centre. Fixed-weight machines in this model reach roughly 30 per cent, hinged counterweights 50 to 60 per cent, in line with published analyses (Denny 2005, Eur. J. Phys. 26, 561; Chevedden et al. 1995, Scientific American; Siano's trebuchet models). Real machines lose more to friction and flexing wood.
Flight. m a = m g - (1/2) ρ Cd A |v-w| (v-w) with Cd = 0.47 for a rough sphere and wind w (along the line of fire). Without drag the range from level ground is R = v² sin 2θ / g, maximal at 45 degrees; launching from height adds the usual correction.
Castle. About 550 stone blocks (0.8 x 0.4 x 0.3 m, density 2300 kg/m³) plus a wooden gate and crates are rigid boxes in a hand-written engine: SAT box-box collision with face clipping, a sequential-impulse solver with warm starting, Coulomb friction (μ = 0.6), soft contacts that dissipate shock waves, and sleeping islands. Blocks never crack; real stone and mortar would. A block counts as dislodged if it moved more than 0.3 m or tipped more than 25 degrees. Dry-stone walls are held by friction under their own weight, so a ball striking low barely moves a block while the same ball striking near the top throws blocks off.
Not modelled: rope stretch and sling slip, wood flexing, rotation of the stone, shattering. The throw plane is fixed, so a cross-wind is not included. This lab is not affiliated with any game or historical re-enactment group.