Periodic-orbit families in the circular restricted three-body problem (CR3BP) are introduced and visualized using the Wolfram Language. A normalized three-dimensional formulation is presented in a rotating barycentric frame, together with the equations of motion, the Jacobi constant, and the distinction between periodicity and stability. Representative initial conditions and orbital periods are retrieved from the NASA Jet Propulsion Laboratory (JPL) catalog, and the corresponding trajectories are reconstructed through numerical integration. Selected Earth–Moon families are examined through planar and spatial plots, with emphasis on their geometry, symmetry, and dynamical connections. This project constitutes one of the lectures for Planetary Theory I in the preliminary PhD programme in Mathematical Astronomy, Department of Astronomy, Space Science and Meteorology, Faculty of Science, Cairo University, under the supervision of Professor Walid Rahoma.

CR3BP Model

In the circular restricted three-body problem (CR3BP), two massive bodies, called the primaries, move in circular orbits about their common centre of mass. The motion of a third body of negligible mass is studied under their gravitational attraction, while its influence on the primaries is neglected. A general three-dimensional formulation is retained so that both planar and spatial periodic orbits can be represented. The primary masses are denoted by
m
1
and
m
2
, with
m
1
>
m
2
. Their relative contributions are specified by the dimensionless mass parameter
μ=
m
2
/(
m
1
+
m
2
)
. The primary separation and the combined gravitational parameter
G(
m
1
+
m
2
)
, where
G
is the universal gravitational constant, are normalized to unity, giving an angular speed
n=1
. A uniformly rotating barycentric frame
(x,y,z)
is adopted, in which the primaries remain fixed at
(−μ,0,0)
and
(1−μ,0,0)
. The
x
-axis points toward the secondary, the
z
-axis is directed along the orbital angular momentum of the primaries, and the
y
-axis completes a right-handed orthogonal coordinate system. For a particle at
(x,y,z)
, the distances
r
1
and
r
2
from the primary and secondary, respectively, are defined by:
r
1
=
2
(x+μ)
+
2
y
+
2
z
,
r
2
=
2
(x+μ-1)
+
2
y
+
2
z
.
(
1
)
Define the distances
r
1
and
r
2
from the particle to the primary and secondary:
In[]:=
r1[t_,μ_]=
2
(x[t]+μ)
+
2
y[t]
+
2
z[t]
;​​r2[t_,μ_]=
2
(x[t]+μ-1)
+
2
y[t]
+
2
z[t]
;
The geometric configuration is illustrated schematically in the orbital plane of the primaries. The origin
O
denotes their common centre of mass, and
P
denotes the particle of negligible mass. The axes
ξ
and
η
define a barycentric inertial frame in this plane, while
x
and
y
define the corresponding rotating axes. The two sets of axes are assumed to coincide at
t=0
, where
t
denotes normalized time, so their relative orientation at time
t
is given by the angle
nt
. The distance from
O
to
P
is denoted by
r
, while
r
1
and
r
2
denote the distances from
P
to the primary and secondary, respectively. The diagram is not drawn to scale; the three-dimensional formulation is retained in the equations of motion.
Illustrate the primaries, the particle, and the inertial and rotating coordinate axes in a planar schematic:
In[]:=
Graphics3D
Three-Body System
,
Options

Out[]=
The gravitational and centrifugal contributions are combined in the effective potential
Ω
, defined by:
Ω=(1-μ)
2
n
2
r
1
2
+
1
r
1
+μ
2
n
2
r
2
2
+
1
r
2
-
1
2
2
n
2
z
-
1
2
2
n
μ(1-μ).
(
2
)
Define the effective potential
Ω
using the normalized angular speed
n=1
:
In[]:=
Ω[t_,μ_]:=(1-μ)
1
r1[t,μ]
+
2
r1[t,μ]
2
+μ
1
r2[t,μ]
+
2
r2[t,μ]
2
-
1
2
2
z[t]
-
1
2
μ(1-μ)
The rotating-frame equations of motion are then expressed in terms of the spatial derivatives of
Ω
:
..
x
(t)-2n

y
(t)=
Ω
x
,
..
y
(t)+2n

x
(t)=
Ω
y
,
..
z
(t)=
Ω
z
.
(
3
)
Here, overdots denote differentiation with respect to
t
, and
Ω
x
,
Ω
y
, and
Ω
z
denote spatial partial derivatives evaluated at the instantaneous particle position
(x(t),y(t),z(t))
. The velocity-dependent terms arise from the Coriolis acceleration.
Construct the three-dimensional rotating-frame equations of motion:
In[]:=
diffEquations=x''[t]-2y'[t]==
∂
x[t]
Ω[t,μ],y''[t]+2x'[t]==
∂
y[t]
Ω[t,μ],z''[t]==
∂
z[t]
Ω[t,μ];
Five equilibrium points, called Lagrange or libration points and denoted by
L
1
,
L
2
,
L
3
,
L
4
, and
L
5
, are obtained where the particle can remain stationary in the rotating frame. The points
L
1
,
L
2
, and
L
3
are collinear with the primaries, while
L
4
and
L
5
form equilateral triangles with them.
The position and velocity components are collected in the state vector
s=(x,y,z,
v
x
,
v
y
,
v
z
)
, where
v
x
=

x
,
v
y
=

y
, and
v
z
=

z
. The initial state is ordered as
s
0
=(x(0),y(0),z(0),
v
x
(0),
v
y
(0),
v
z
(0))
. For a specified
μ
, a trajectory is obtained by integrating Eq. (3) from the initial state
s(0)=
s
0
. A nonconstant solution is periodic when its complete state repeats:
s(t+T)=s(t).
(
4
)
Here,
T>0
denotes a repetition time, and the smallest such value is defined as the orbital period. The state components are expressed in normalized rotating-frame coordinates, and
T
is expressed in normalized time units. Periodicity is defined relative to the adopted frame. The periodic orbits presented here are closed in the rotating frame. Closure in an inertial frame is not necessarily implied.
Define the orbit integrator for a supplied initial state
s
0
, orbital period
T
, and mass parameter
μ
:
In[]:=
orbitSolve[initialState_,orbitPeriod_,systemMass_]:=FirstNDSolve
Equations
,{x,y,z},{t,0,orbitPeriod},
Options

The Jacobi constant
C
J
is the conserved quantity:
C
J
=2Ω-
2
v
x
+
2
v
y
+
2
v
z
.
(
5
)
For a specified mass parameter
μ
, the Jacobi constant
C
J
is calculated from the initial state
s
0
using Eq. (5) and remains constant along an exact trajectory.
Periodicity describes the repetition of an orbit, whereas stability concerns its response to small changes in initial position and velocity. Stability means that sufficiently small initial changes keep trajectories close to the reference orbit, whereas instability means that arbitrarily small initial changes can lead to departure from it. A periodic orbit may therefore repeat exactly without being stable. A stability index
S
is used to describe linear stability. For the catalog index used here, values above one indicate linear instability, while values at or below one satisfy the catalog’s stability criterion. This criterion alone does not establish nonlinear stability. The index is retained as a descriptive orbital property, and its calculation is outside the scope of this study.

NASA JPL Periodic-Orbit Catalog


Planar Lyapunov Families

Planar Lyapunov orbits form families of periodic solutions that emerge from the planar oscillatory modes of the collinear equilibrium points
L
1
,
L
2
, and
L
3
. One family originates from each point, giving three planar Lyapunov families. Their motion is confined to the orbital plane of the primaries, so
z(t)=0
and
v
z
(t)=0
, and their trajectories are closed in the rotating frame. For the Earth–Moon system, 20 representative orbits are selected from each family. The initial state
s
0
and period
T
of each selected orbit are retrieved from the NASA JPL catalog and used to integrate Eq. (3). The three families are first plotted separately and then combined in a single plot.
Retrieve the Earth–Moon
L
1
,
L
2
, and
L
3
Lyapunov families, select 20 representative orbits from each, and integrate their trajectories:
In[]:=
lyapunovData=catalogImport/@(familyQuery["earth-moon","lyapunov",#]&/@{"1","2","3"});​​(*Export[FileNameJoin[{NotebookDirectory[],"lyapunovData.wxf"}],lyapunovData,"WXF"];*)​​(*lyapunovData=Import[FileNameJoin[{NotebookDirectory[],"lyapunovData.wxf"}],"WXF"];*)​​{lyapunovRows,lyapunovStates,lyapunovPeriods,lyapunovMass,lyapunovSolutions}=familyPrepare[lyapunovData,20];
Plot the
L
1
,
L
2
, and
L
3
planar Lyapunov families from left to right in the rotating
x–y
plane:
In[]:=
RowTableShowTableParametricPlot
Orbits
,{i,1,Length[lyapunovSolutions[[j]]]},
Options
,{j,1,Length[lyapunovSolutions]}," "
Out[]=
​
Combine the
L
1
,
L
2
, and
L
3
planar Lyapunov families in a single plot in the rotating
x–y
plane:
In[]:=
ShowFlattenTableParametricPlot
Orbits
,{j,1,Length[lyapunovSolutions]},{i,1,Length[lyapunovSolutions[[j]]]},
Options

Out[]=

Halo Families

Halo orbits are spatial periodic solutions belonging to families that branch from planar Lyapunov families at bifurcation points, where new families of periodic solutions emerge. The motion along a Halo orbit includes oscillations both within and perpendicular to the orbital plane of the primaries. Each collinear equilibrium point
L
1
,
L
2
, and
L
3
is associated with northern and southern Halo families, giving six families. The northern and southern families are related by reflection across
z=0
. For the Earth–Moon system, 20 representative orbits are selected from each family. The initial state
s
0
and period
T
of each selected orbit are retrieved from the NASA JPL catalog and used to integrate Eq. (3). The northern and southern families are plotted together at each libration point, first in three dimensions and then in an
x–z
projection. Finally, all six families are combined in a spatial view alongside the corresponding projection.
Retrieve the six Earth–Moon Halo families, select 20 representative orbits from each, and integrate their trajectories:
In[]:=
haloData=catalogImport/@(familyQuery["earth-moon","halo",#[[1]],#[[2]]]&/@Tuples[{{"1","2","3"},{"N","S"}}]);​​(*Export[FileNameJoin[{NotebookDirectory[],"haloData.wxf"}],haloData,"WXF"];*)​​(*haloData=Import[FileNameJoin[{NotebookDirectory[],"haloData.wxf"}],"WXF"];*)​​{haloRows,haloStates,haloPeriods,haloMass,haloSolutions}=familyPrepare[haloData,20];
Plot the northern and southern Halo families together at
L
1
,
L
2
, and
L
3
from left to right in three dimensions:
In[]:=
RowTableShowFlattenTableParametricPlot3D
Orbits
,{j,{2k-1,2k}},{i,1,Length[haloSolutions[[j]]]},
Options
,{k,1,3}
Out[]=

Vertical Families

Retrieve the five Earth–Moon Vertical families, select 20 representative orbits from each, and integrate their trajectories:

Axial Families

Long-Period and Short-Period Families

Distant Prograde and Retrograde Families

Retrieve the Earth–Moon DPO and DRO families, select 20 representative orbits from each, and integrate their trajectories:
Plot the DPO family on the left and the DRO family on the right in the rotating x–y plane:

Low Prograde Families

Retrieve the eastern and western Earth–Moon LPO families, select 20 representative orbits from each, and integrate their trajectories:

Butterfly and Dragonfly Families

Retrieve the northern and southern Earth–Moon Butterfly and Dragonfly families, select 20 representative orbits from each, and integrate their trajectories:
Plot the northern and southern Butterfly families together on the left and Dragonfly families together on the right in three dimensions:

Planar Resonant Families

Retrieve the eleven Earth–Moon planar resonant families, select 20 representative orbits from each, and integrate their trajectories:

CITE THIS NOTEBOOK

Periodic orbits in circular restricted three-body dynamics​
by Akram Masoud​
Wolfram Community, STAFF PICKS, October 21, 2026
​https://community.wolfram.com/t/28380