The central-force motion program shows orbital motion of a particle under the influence of central forces that vary as the nth power of the distance from the force center. One can choose from six powers: n = 1 (spring), n = 0 (constant), n = -1, n = -2 (gravity), n = -3, and n = -5. The orbiting particle starts off moving tangentially with a velocity of 0.488 in units where a velocity of 1.0 results in a circular orbit with period 2p. For a force-law with n > -3 the orbit is drawn for a time of 47.3 in the units used, and the final position is shown in magenta. The program determines Rmin, the distance of closest approach to the force-centre, and the apsidal angle, the angle between Rmax and Rmin. The spring and gravity produce orbits that close, and the initial velocity was chosen to give the n = -1 orbit 16 lobes after 11 revolutions (to make the pretty picture shown below).
Values of n more negative than -2 produce circular orbits for an initial tangential velocity of 1.0, but quite different orbits for other initial velocities. For n = -3 the orbit is an inward spiral about the force-centre with an initial velocity of 0.999 (it would be an outward spiral with an initial velocity of 1.001). For n = -5 the orbit is a circle that passes through the force centre (the lower part of the circle is drawn by reversing the direction of the initial velocity). The analytic problem is usually worded: If a particle moves in a circular orbit passing through the centre of the force causing the motion, show that the attraction varies as the inverse 5th power of the distance from the force centre. The initial velocity used in the applet, 1/SQR(2), comes from the analytic solution to this problem.
Cforce Source Code
Although Newton's Law is all that is needed to generate a central-force orbit, the nature of the orbit can be understood more clearly by making use of the fact that angular momentum is a constant of the motion. When written in terms of angular momentum, the tangential kinetic energy varies inversely as r squared and can be treated as a centrifugal potential. For forces with n = -2 or greater, the r motion is an oscillation in a potential well. The well for n = -2 is shown below:
The potential is plotted in cyan, the centrifugal potential is plotted in green, and the two are added to give the effective potential plotted in blue. The intersections of the effective potential with the total energy (in red) determine the apsidal distances. The orbiting particle starts out at one apside with its velocity perpendicular to the radius vector from the force center. The first task undertaken in the program is to find the second apside (if one exists). The initial velocity in all cases is less than the velocity required for a circular orbit, so the second apside will be closer to the force centre. The program uses a bisection algorithm to locate it.
The orbit can be calculated from the energy equation in much the same way as time was calculated from the energy equation for the pendulum. Conservation of angular momentum enables angle to replace time in the calculation. The region between the apsides is divided into 10,000 intervals, and values of dtheta are stored for subsequent plotting.
Apsides Source Code