Directions at bottom.

- The STAR sets everything in motion;
- The BOMB stops the motion and resets
(you don't need to press it: if the mouse is over the BOMB,

as soon as the program gets out of a computational loop it resets). - There are 5 BALL buttons which highlight a corresponding orange ball in the square;
- Once highlighted they can be moved with the ARROW buttons;
- The FLOWER button moves the inner 4 balls diagonally and symmetrically outward;
- The SQUARE button changes the dynamics of the square (more later).

then click the BOMB.

The 576 balls in the square are programmed to act like they are connected to their neighbors

by springs (neighboring balls are top, bottom, left, right, and diagonals). A spring

stretched an amount

on the objects to which it is attached (if one of the objects has a mass

then it experiences a resulting acceleration

the amount of stretch (or compression - the negative sign indicates that the spring always

pushes in the direction opposite the compression or stretch).

Well, let's face it, this is a virtual world. The balls on the screen don't have a real

mass, so we can set it equal to anything we want. Same thing for

set

Ok, so the equation above reduces to:

Acceleration is the rate of change in the velocity, which is

An assumption lying behind these equations is that space and time are continuous

not discrete (the set of all integers is a discrete subset of the continuous set of all

real numbers - each set is infinite, but the infinity of real numbers is provably bigger

than the infinity of integers).

The balls in this simulation will move if they have a velocity (a vector quantity).

This will arise initially from an unbalanced force producing an acceleration.

Let's look at a single ball somewhere in the middle. It has to be told by the computer

to move. The computer makes a computation for the new position of the ball (and all the

others), moves them, then based on the changes that have occured, it makes a new

computation, moves everything again, etc. The basic cycle is:

- based on coordinates figure out forces on the balls;
- the forces have the same magnitudes as the accelerations, so we now have these too;
- use the accelerations to update the velocities (vector components);
- use the velocities to update the coordinates;
- move the balls.

thing being simulated: as far as we know space and time are continuous; but a computer

screen consists of discrete points, and finitely many; and time too is discrete on

the computer, a cycle through the computation being the shortest interval for this

simulation. So we don't have infinitesimals like

can do is set

What's done here is:

setAt vx, n3, (getAt(vx,n3)) + t*(netX)These are vector equations. The first two update the x- and y-components of the velocity

setAt vy, n3, (getAt(vy,n3)) + t*(netY)

setAt x, n3, (1.0*getAt(xo,n3)) + ((getAt(vx,n3))*t)

setAt y, n3, (1.0*getAt(yo,n3)) + ((getAt(vy,n3))*t)

with netX and netY (acceleration components). So they're an attempt to simulate:

The second two are an attempt to simulate:

(The computer language is Lingo, part of the Director software.)

You may notice that I've thrown in a factor t. This can be adjusted to make

the simulation closer to reality, but at the cost of slowing down the program.

It is set at a value that made things run well on my machine (Mac G3).

What about the SQUARE button? That reverses the order of the computer equations above.

This makes it a worse simulation, but gives rise to very neat patterns (push the SQUARE

to the "in" position, push the FLOWER once, then push the STAR; then watch).

Finally, as time passes the simulation will look less and less physically accurate.

Things blow up, and I've seen very weird foldings in the pattern of 576 balls - a kind of

topological collapse. This is a consequence of the discreteness of the variables.

Physical reality presumably carries a great deal more accuracy from moment to moment

than is possible here. A great deal more could be said, but I doubt anyone has even read

Mathematical Ideas in Science.