A Model Universe W Roy Masefield, Holland-on-Sea, Essex The motion of two bodies under the influence of gravity - the so-called two-body problem of classical mechanics - lends itself very well to demonstration by computer. The mathematics of the problem is quite straightforward, involving nothing more than Newton's Laws of Force and Motions. The possible demonstrations include such things as the capture of one astronomical body by another; orbits of satellites; behaviour of binary stars and so on, given only the starting data. When the program is Run, the data is called for, and to give you some idea of suitable values to start with, I suggest you try out those given in figures 1 to 5. [These figures were screen dumps of the program in execution. With the data given below, you can recreate them yourself.] Then, when you get the feel of it, to try your own values. Angles, by the way, are entered in degrees - the program converts these to radians as required by the ZM Spectrum - with zero being the east direction. Negative values for the angles are legitimate. The initial positions of the two bodies are entered as x and y co-ordinates, these being the normal pixel co-ordi- nates of the Spectrum, but do not go above x=170 because the right-hand quarter of the screen is reserved for displaying the starting data. When all the data is entered, the program starts to plot the paths. It is not fast, but fascinating to watch. Plotting continues until one of the curves runs off the edge of the screen area, but plotting can be stopped at any point by Break. A look, now, at some of the possible demonstrations. Figure 1: This shows a small mass orbiting a much larger one. [Data: M1=1000, v1=0, A1=0, x1=90, y1=90, M2=1, v2=14.142, A2=0, x2=90, y2=140, G=10. And yes, this orbit is instable. It's surprisingly hard to find a perfectly stable one.] Figure 2: In this, a small body approaches a more massive body at an oblique angle to the direction of the gravi- tational force. The larger body is initially at rest. The smaller body is pulled out of its straight-line path and traces a near-parabola, and the larger body is given some motion and it begins to trace out a curved path. [Data: M1=100, v1=0, A1=0, x1=110, y1=88, M2=10, v2=2.5, A2=0, x2=0, y2=140, G=10.] Figure 3: Binary stars are illustrated here. One star is larger than the other, and each has been given the required tangential velocity for a circular orbit round the common centre of gravity. Try other velocities and see what happens. [Data: M1=100, v1=1.49, A1=0, x1=80, y1=125, M2=50, v2=2.98, A2=180, x2=80, y2=55, G=10.] Figure 4: This is an Earth-Moon simulation. The larger body is given a velocity as if in orbit round the sun. As we are looking at only a short piece of this orbit, the lack of curvature does not matter. The smaller mass is given the velocity calculated to keep it in orbit, plus the velocity of the larger. The resultant paths are fair approximations to what actually happesn with the Earth-Moon system: the Moon performs a series of loops and the Earth, because of the mutual gravitational action, does a series of cycloid-like loops. Certainly, the Earth's path is not a smooth one. [Data: M1=100, v1=12.16, A1=0, x1=0, y1=130, M2=600, v2=0.33, A2=0, x2=0, y2=80, G=10.] Figure 5: For fun, we may see what happens when the force of gravity is repulsive instead of attractive, i.e., when we have the anti-gravity of science fiction. To do this, enter a negative value for the gravitational constant. The figure shows two equal masses approaching each other almost, but not quite, in a direct line. See if you can interpret what is happening if they /are/ in an exact head-on course. [Data: M1=100, v1=4, A1=-45, x1=0, y1=150, M2=100, v2=4, A2=135, x2=140, y2=30, G=-7.] Adventurous programmers might like to develop this program further by including action under electric forces. In this case, instead of F_g, we shall have F_E, which depends on the electric charges (q) carries by the bodies: k q_1 q_2 F_E = --------- 2 d The motions resulting from this force behave exactly as for gravitation, i.e., they depend on the masses of the bodies.