The first example follows the trajectory of a projectile launched from the north pole at an angle of elevation of 45 degrees. The program finds the latitude at which it lands, its impact angle, and its impact velocity.
The second example plots orbital motion under the influence of forces that vary as a power of the distance from the force center. One can choose from three different powers: direct first power (the spring), inverse second power (gravity), and inverse first power. The spring and gravity orbits always close, and the initial conditions make the inverse first-power orbit appear to close eventually (it makes a pretty picture that way). 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 gravity and the spring, the program checks the accuracy with which the numerically-calculated orbit closes, uses the symmetry of the orbit to find Rmin, and calculates the ratio of the period to the period of a circular orbit. For gravity the program also calculates the period ratio by substituting values of Rmin and Rmax into Kepler's Law. (For the spring the period ratio should be 1.0). For the inverse first-power force, the program calculates Rmin and the apsidal angle (the angle between Rmax and Rmin) directly. The apsidal angle is found to be approximately 360*11/32 degrees, so after 11 revolutions a closed 16-lobe pattern is produced.
In the third example, the attractive force is exerted between particles of comparable mass. The Feynman algorithm must be extended to deal with the motion of both particles, but the steps in the calculation remain the same. An analytic solution first introduces center-of-mass coordinates, then treats the motion of a reduced-mass particle attracted to a fixed force center. These steps are not needed in the numerical solution, but it is instructive to view the orbits in a frame moving along with the center of mass as well as in the lab frame. The program allows this option. The particles have a mass ratio of 3 to 2, the lighter particle starts out to the left, and vectors indicate the initial velocities. The attraction is an inverse second power force (gravity). The Liberty Basic program is annotated, but the comment fields in the Java program were removed to help get rid of a bizarre error.
The fourth example deals with Rutherford scattering. Scattering is the term used to describe unbound orbits in central force fields (attractive or repulsive). In Rutherford scattering, the force is the repulsive Coulomb force felt by an a-particle as it approaches the nucleus of a heavy atom. If the atom is heavy enough, the nucleus can be treated as a fixed force center, and the Feynman algorithm from the benchmark program in the second example can be used directly. The incident trajectory is specified by two parameters: a, the distance of closest approach in a head-on collision, and b, the impact parameter (the distance of closest approach along the incident trajectory if there is no interaction). In the example, the incident beam has a circular cross-section of radius b = 2.5a. The starting point for the numerical calculation is 40a from the scattering center (twice the distance shown in the plot). The program offers three choices: (a) trajectories for impact parameters stepped uniformly across the beam, (b) trajectories for the same number of incident particles distributed randomly across the area of the beam, and (c) a histogram versus scattering angle (in ten-degree increments) for 500 randomly distributed incident particles. In (c) the angular distribution calculated by analytic methods is shown (in blue) for two seconds before the particle beam is turned on. The analytic treatment evaluates the integral in the Apsidal Angles section and finds that the impact parameter and scattering angle are related by tan(q/2) = a/2b. (We will use z for this expression - an expression that predicts, for example, that no particles in our beam will be scattered through less than 22.6 degrees.) The angular distribution calculated using this expression, the Rutherford scattering formula, is usually written in terms of the inverse fourth power of a sine function, but when all the particles are being counted it is more convenient to write the angular distribution as proportional to (1+z2)/z3. This distribution function predicts that 60 of the 500 incident particles will be scattered through more than 60 degrees.