Optimizing the Counterweight Trebuchet

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

This Demonstration simulates a counterweight trebuchet and lets you change several parameters to optimize the shooting range.


A trebuchet is a medieval stone-throwing war engine. The projectile is inside a pouch hanging on a sling attached to the long end of a balancing beam. A heavy counterweight hangs on the short end of the beam.

Some medieval trebuchets had beams of up to 10 meters and could throw stones of 100 kg as far as 300 meters [1]. The machine in this Demonstration has a beam of approximately 2 meters and can throw projectiles of 3 kg to a distance of up to 30 meters.

To maximize the shooting range, the most critical parameter is the angle of the sling when the projectile is released. This defines the moment when the pouch opens and the projectile takes off and follows its ballistic path.


Contributed by: Erik Mahieu (March 2012)
With additional contributions by: Franz Brandhuber
Open content licensed under CC BY-NC-SA



The trebuchet model is similar to that of a pendulum assembly with three degrees of freedom:

are the angles with the vertical of the beam, the counterweight, and the sling; 

are the weights of the projectile and the counterweight;

are the lengths of the beam's long and short ends, the rope that holds the counterweight and the sling.

Drag, friction, and the weight of the beam are neglected in this Demonstration.

The Lagrangian of this system is obtained from the equilibrium of the potential and kinetic energies of its parts ( is the force of gravity):

This results in the three equations of motion:

Solving these with the "EventLocator" method of NDSolve, we catch the sling when it is at the desired angle to release the projectile.


[1] E. E. Viollet-le-Duc, "Diagram of a Trebuchet," Dictionnaire Raisonné de l'Architecture Française du XIe au XVe Siècle, Paris: Bance, 1858.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.