This Demonstration shows the position or velocity of two bodies under gravitational attraction, together with the path of a particle at the Lagrange point L4. The L4 point is determined by the initial conditions for the two bodies. The path of the particle is then computed by gravitational dynamics. Under some conditions the L4 path becomes unstable.
Think of the blue point as the Earth and the red point as the Sun. The range of values that you can select for the mass of the first (blue) body is smaller than that for the second (red) body. The center of mass is the common focus of the three ellipses. The path of each body's velocity is a circle. The radius of the circle is given by , where is the body's (constant) angular momentum, its mass, and the effective mass at the position of the focus.
 R. Baierlein, Newtonian Dynamics, New York: McGraw–Hill Publishing Company, 1983.
 Wikipedia, "Lagrangian Point."
Wolfram Demonstrations Project
Published: March 7 2011