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 Inverted Pendulum: Executable or Text Version

This program graphically models a difficult-to-believe phenomenon; if you jiggle the pivot of an upside-down pendulum up and down fast enough, the pendulum remains upside-down.

Suggested trial values for the various parameters are included. The suggested number of time-steps is 5000. This is fine for a PC with a 2GHz or greater CPU. For older, slower machines, reduce the time slots down to 500 or so.

I've now added the option to view the Phase Space plot for the motion. This is more the sort of thing a mathematician would look at, because it indicates qualitative aspects of the behaviour more clearly. It shows better what angle and angular velocity combinations are common, and which are "no-go" areas, for example. It may be impossible to spot a regular pattern from the actual motion - a Limit Cycle for instance. There is no Limit Cycle for the Inverted Pendulum, but the parameters are confined to defined values for the entire duration of the motion.

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 is relatively straightforward to write down the Equations of Motion for this system using the formulae for the acceleration of a particle in Cylindrical Polar co-ordinates.

If the parameters you choose are too drastic, this model goes spectacularly haywire. I've left it that way just for amusement.

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

Double Pendulum: Executable or Text 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.

To even set up the relevant highly non-linear dual differential equations requires the formidable somewhat abstract mathematical machinery of Lagrangian Dynamics and Generalised Co-Ordinates. Surprisingly though, the program to solve these equations numerically using the Improved Euler Method is fairly short and simple (once I ironed out my algebraic errors, which are very easy to make).

The path of the second pendulum is truly chaotic. The relevant mathematics can be found on the Eric Weisstein Physics site. Alternatively, I've scanned in the 4 pages of mathematical workings I did to get to the right equations for numerical analysis:

My Workings: Pages One Two Three Four

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.

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