Potential: Executable or Text Version

Displays a never-ending sequence of random postive and negative electric point charges - and the associated electric field potential in accordance with Coulomb's Law.

The Vibrating Pendulum: Executable or Text Version

This program graphically models a pendulum with a vibrating pivot; under certain conditions, if you jiggle the pivot of an upside-down pendulum up and down fast enough, the pendulum remains upside-down.

This is a COMPLETE REWRITE in January 2018 of a version written 15 years ago, including now the use of the high accuracy 4th-order Runge-Kutta method to numerically solve the relevant 2nd-order non-linear and non-autonomous differential equation - shown below. It is known as Mathieu's Equation.

Spring Pendulum: Executable or Text Version

In this program, the non-linear behaviour of a pendulum bob swinging back and forth attached to a spring is examined. It has been COMPLETELY reworked from scratch in January 2018, including the underlying Maths. Equations of motion were developed using Lagrangian dynamics, and the equations for numerical solution of the motion using the Improved Euler method were completely redone. This version is far more accurate. Conservation of energy remains constant to 4 decimal places.

For a quite detailed mathematical derivation of the relevant equations, and how these relate to the approximations I have used, I have prepared a COMPLETELY NEW pdf document here: SpringPenMath

Double Pendulum: Executable or Text Version .... OR .... Executable or Text Runge-Kutta Version

The Double Pendulum problem involves a pendulum hanging from a pendulum. It's easy to make one, but it's a pretty ferociously difficult mathematical problem, by most peoples' standards.

The relevant highly non-linear dual differential equations can be set up using Lagrangian dynamics, but for my TOTAL REWORK of this program in January 2018, I used vectors in a mix of polar and Cartesian coordinates, and normal Newtonian mechanics. The first program to solve these equations numerically uses the Improved Euler Method and is fairly short and simple. I have also done a more accurate Runge-Kutta version, which includes a Phase Space view option.

The path of the second pendulum is truly chaotic. A fairly comprehensive coverage of the (reworked) relevant mathematics is included below.

My Workings: DoublePendulum.pdf

The Program keeps on running until you stop it. The Total Energy (Kinetic + Potential) should remain unchanged throughout the motion, but as time progresses the error in the calculations very slowly accumulates. The program more rapidly becomes inaccurate if the top pendulum mass is very small compared with the lower one, and the time-steps are reduced in this case.

Rocket: Executable or Text Version

An extension to the Fireworks program, the Differential Equations for the Rocket program can only be solved numerically. The equations incorporate the changing mass of the rocket as fuel is used up, with a break-point once the fuel is gone, and air resistance according to the square of the speed affecting the flight of the missile throughout.
On the basis that elegance is always superior, this rewritten version is altogether simpler in structure, shorter, quicker, generally adaptable and more accurate than my previous attempt.
An excellent example of the
K.I.S.S. principle (Keep It Simple, Stupid)

3-D Scaffolding: Executable or Text Version

Builds scaffolding in space whilst rotating according to Euler angles. The scaffold poles appear larger when closer, changing shape as they rotate, and either recede or approach.


Stars: Executable or Text Version

Another bit of complete trivia! This is a screensaver-style program displaying moving, rotating wheel-spokes, but with an Assembly Language routine to dim the entire screen every so often.

Return to Top Page

Next Page