Pendulum, a pendulum simulator


Pendulum is a simulator for pendulum systems. Different types of system are supported (for example single-pendulum, double-pendulum etc..) and multiple systems can be simulated at once (useful for comparing the time-evolution of similar systems). Also, several time-integration schemes are available.

Pendulum is `free software' meaning that you have the freedom to study, modify, and share it as well as share your modifications.

Interesting physics

Perhaps the most interesting physics that can be seen using Pendulum, is the chaotic nature of double-pendulums. (In fact the default configuration is designed to show exactly this phenomenon.)

A double-pendulum is very easy to understand; it is just a pendulum with another attached to the end. This system is chaotic, that is, it has extreme sensitivity to initial conditions. If we have two identical linear systems and we perturb one system slightly, the systems will behave in almost the same way. However, in a chaotic system this not the case. The systems' behaviour will eventually follow completely unrelated paths.

You may well be wondering at this point what this has to do with anything! Well consider trying to predict the behaviour of a given double-pendulum. In reality no tools for measuring the initial conditions of the pendulum are perfect. And so when you model the behaviour of the pendulum you will actually be modeling the behaviour of a slightly different (or perturbed) system. Consequently, after some time (depending on the accuracy of your measurements) the results of your model will bear no relation to the true behaviour of the real system.

All this really means is that you cannot make long-term predictions of chaotic systems. Now, being unable to predict the long-term behaviour of a double-pendulum isn't a big problem for most of us. However, there are chaotic systems in the world that do affect most of us, for example the weather. This is why the weatherman often gets it wrong!


Pendulum 0.1 (wxGTK) simulating two double-pendulums on GNU/LinuxPendulum 0.1 (wxGTK) simulating two double-pendulums on GNU/Linux Pendulum 0.1 (wxMSW) simulating a single-pendulum on Windows XPPendulum 0.1 (wxMSW) simulating a single-pendulum on Windows XP


  • Enhance the wxWidgets GUI to allow the systems to be configured. (At the moment this must be done using command-line arguments.)
  • Add a `file' UI to allow data to be output to a user defined file (or standard output if none is given). This would allow data to then be plotted through a 3rd party application such as Gnuplot.
  • Enhance the wxWidgets GUI so that in addition to the display of the pendulums it also plots graphs of quantities such as the angle, angular velocity, and energy (total, kinetic and potential can all go on the same graph).

Known bugs

There are a few issues with the current version:

  • [All ports] The wxWidgets GUI sometimes segfaults on exit. This seems to be due to the calculation thread dereferencing the wxTheApp pointer, which becomes invalid as the GUI is closing. Any elegant solutions to this problem would be most welcome!
  • [Windows port] On Windows XP the wxWidgets GUI may simulate the systems too quickly, ie. not in real-time.


Name Version Type
pendulum-0.1-install.exe 0.1 Windows Installer
pendulum-0.1.tar.bz2 0.1 BZip2'd Source Tarball
pendulum-0.1.tar.gz 0.1 GZip'd Source Tarball