1089 and All That

by

David Acheson


Computer Software


The following programs have been specially written to accompany my book 1089 and All That.

The simplest way I know of running the programs (on a PC) is to first download the software qb64.
Next, unzip qb64, extract all the files, and put everything in a folder called qb64.
Then download 1089andAllThatPrograms. Unzip, to obtain the .exe files, and put them all in the same folder, qb64.
The programs are identified by the (approximate) corresponding page numbers of the book.
Double-clicking on any program should make it run. Each comes in two versions; one will run in a window, the other (its name prefaced by 'f ') will run full screen.
To STOP a program at any time, if all else fails, press Ctrl-Break.


The 1089 trick

This program is for the '1089 trick' itself, introduced on pages 1 and 2 of the book.


Motion of planets and comets

This program animates the figure on page 45, and shows, in particular, the variation in speed as the planet or comet proceeds around its orbit.


Minimal network problem

This program provides some evidence, by limited trial and error, that the configuration on pages 71-72 is the shortest.


Various ways of calculating pi

This program compares the four methods of calculating pi that are mentioned on pages 88-90, namely Viete's product formula, Wallis's product formula, Leibniz's series and Euler's series.


Strange behaviour of an infinite series

This program is concerned with how the infinite series

1 - 1/2 + 1/3 - 1/4 + 1/5 - 1/6 + .............

on page 108 can be made to converge to different 'sums' by adding the terms in different orders. The user can choose the order freely, and see the results graphically.


Computer solution of differential equations

This software shows computer 'solutions' for the bobbing spider problem on page 116. The smaller the time step, the more accurate the solution.


Using playing cards to determine e

This program uses a random number generator to simulate the playing-card routine described on pages 131-2.
A second program, more suitable for large numbers of trials, is also provided.


The gravitational three-body problem

This program includes an animation of the figures on pages 136-7, showing the (complicated) motion of three equal masses which attract one another according to the law of gravitation.
While the three-body problem is a very old one, some very interesting 'simple' motions have been discovered only recently, and the software includes an example of one of these. (But see also the external software listed further down this page.)


An elementary example of chaos

This program relates to the 'simple' chaotic system discussed on pages 140-141. The user can experiment with different values of the parameter a, and different starting values x1. The outcome is typically chaotic if a > 3.57 .


Chaos and catastrophe for a vibrated pendulum

This program is an animated version of the figure on page 145. The pivot of a simple, rigid pendulum is vibrated up and down, in an entirely regular way, at twice the pendulum's natural swinging frequency. The user can gradually alter the magnitude A of the pivot motion. Striking changes in the behaviour of the pendulum take place as A is gradually increased - and, indeed, when A is gradually decreased again.


The upside-down pendulum theorem

This program illustrates Chapter 15: 'Not Quite the Indian Rope Trick', with a gravity-defying system involving three linked pendulums, turned upside-down.




Links to other Web Resources


Planetary motion

This Java applet offers an animated version of the figure illustrating elliptical planetary motion on page 45. By simply adjusting the slider at the bottom, the degree of ellipticity can be changed. A highly elliptical orbit (as for a comet) means very substantial increases in speed as the object gets closer to the 'Sun'.



Dropping needles to determine pi

This is a computer simulation, using a random number generator, of the 'dropping needles' method for estimating pi, described on page 92. If you press the 'Drop 1000' button several times in succession it's quite fast, but I'm not sure it's as much fun as drawing some lines on a sheet of paper and doing it for real!


New developments in the n-body problem

Although motions in the gravitational N-body problem are typically chaotic (see the case N=3 on pages 136-7), some remarkable periodic motions have been discovered very recently, and this link provides some impressive animations.