Creating a simple orbit of one object
We can have a single body in a standard orbit using default values.
How to do it...
If we use this script:
import rebound sim = rebound.Simulation() sim.add(m=1) sim.add(a=1) fig = rebound.OrbitPlot(sim) fig
We have the resulting figure:

How it works...
Any instance of rebound starts with the Simulation()
command.
add(m=1)
adds a star in the center of the diagram. add(a=1)
adds an object in orbit about m
. In this case, many defaults take effect, resulting in this very standardized circular orbit.