Presets
Playback
The machine
Release and target
Layers
Model checks
The science
A double pendulum with a gravity engine
The beam turns about a fixed pivot by angle θ; the stone hangs from the long arm on a sling at absolute angle ψ. With a counterweight M on the short arm a, beam mass mb and stone mass m the kinetic energy is T = ½I1θ̇² + ½mL²ψ̇² + m b L θ̇ψ̇ cos(θ−ψ) and the potential is V = g(−Ma + mbc + mb) sinθ + m g L sinψ. Lagrange's equations give two coupled second-order equations, integrated here with RK4 at 0.2 ms.
Release. The sling pin lets go when the stone's velocity points at the chosen release angle. A lower pin angle releases later and flatter; a higher one earlier and steeper. The range plot sweeps that angle for the current machine - the peak is not at 45° because the stone leaves from height above the ground and with an energy that depends on when it is let go.
Efficiency is the stone's kinetic energy divided by the potential energy the counterweight released. Real trebuchets reach roughly 30-60 %; the rest stays in the swinging beam and counterweight.
Honest simplifications: the counterweight is fixed to the beam (no hinge), the sling is massless and inextensible, there is no air drag, friction or ground contact for the beam, and the stone flies as a parabola. Compare with the 3D lab for the hinged weight and a block castle.
What to try
- Press Fire with the default preset, then drag the release-angle slider and read the range curve.
- Double the counterweight and watch the efficiency fall: more energy is stored, but the heavier beam keeps a larger share.
- Lengthen the sling: the stone swings out wider and leaves faster.
- Aim the target to the predicted range and fire: a green hit marker appears.