Simulation

Orbital Motion

GravitationOrbits

A planet orbiting a star showing gravitational force and orbital velocity — adjust orbit radius and star mass to explore Kepler's laws.

Objective

Confirm that a planet held in circular orbit by Newtonian gravity obeys v = √(G·M/r) and Kepler's third law T = 2π·√(r³/(G·M)). At each Orbit Radius and Star Mass setting, the planet is launched at the exact speed required for a closed circular path; the readouts let you measure orbital radius, speed, and angular position over time. The experiment also exposes the inverse relationship between radius and speed, and between central mass and period.

Setup

  1. Leave the Orbit Radius slider at its default value of 100 m. This sets the planet's launch position at (100, 0) and the gold reference circle at radius 100 m, providing a fixed visual benchmark for the orbit.
  2. Leave the Star Mass slider at its default value of 50 (in GM×10³ units), giving an effective GM = 50000 m³/s². The planet will be launched at the circular-orbit speed √(GM/r) ≈ 22.36 m/s.
  3. Press Start. The planet leaves (100, 0) tangentially with a purely vertical velocity vector; the dotted blue arrow tracks velocity direction and the red arrow tracks the radial gravitational pull toward the central star.
  4. Watch the Distance, Speed, and Angle readouts as the planet sweeps around. For a true circular orbit, Distance should hold near 100.00 m and Speed near 22.36 m/s while the Angle increments smoothly from 0° back through 360°.
  5. Note the Time readout when the planet returns to its starting Angle of 0° — that elapsed time is the measured orbital period T. The simulation runs for up to 85 s, long enough to capture roughly three complete revolutions at default settings.

Analytical Prediction

For a circular orbit the gravitational force supplies the centripetal force, giving v = √(G·M/r) and the period T = 2π·√(r³/(G·M)) (Kepler's third law). The simulation works in scaled units where the Star Mass slider value s represents G·M = s × 10³ m³/s². At the defaults r = 100 m and s = 50, that is G·M = 50000 m³/s²:

v=√(G·M / r)
=√(50000 / 100)
=√500
22.36 m/s
T=2π · √(r³ / (G·M))
=2π · √(100³ / 50000)
=2π · √20
28.10 s

Over the 85 s simulation cap the planet should therefore complete 85 / 28.10 ≈ 3.02 orbits. The escape speed at this radius is:

v_esc=√(2 · G·M / r)
=√1000
31.62 m/s

which is √2 ≈ 1.414 times the circular speed — a useful upper bound when comparing the launch speed shown in the Speed readout to the threshold for an unbound trajectory.

Results Analysis

After Start, the readouts should hold near Distance = 100.00 m and Speed = 22.36 m/s for the entire run, confirming the circular-orbit relation v = √(G·M/r) at r = 100 m and G·M = 50000 m³/s². The Angle readout sweeps from 0° to 360° in roughly 28.10 s — the predicted Kepler period — and the planet returns to its starting position about three times before the 85 s cap stops the loop. To test the radius dependence, slide Orbit Radius to 200 m at the default Star Mass = 50; the predicted circular speed drops to √(50000/200) ≈ 15.81 m/s and the period stretches to 2π·√(200³/50000) ≈ 79.48 s, so only one full orbit fits inside the 85 s cap. Doubling Star Mass to 100 at r = 100 m raises G·M to 100000 m³/s², so v rises to √1000 ≈ 31.62 m/s and T shrinks to 2π·√(100³/100000) ≈ 19.87 s — the same circle traversed faster.

Source of Error

What this sim does NOT model: third bodies (no Sun perturbing a planet-moon system, no other planets), finite size of the central star, atmospheric drag from the orbiting body's own atmosphere, central-body rotation, oblateness, tidal dissipation, or relativistic corrections (precession, frame-dragging). The orbit is a two-body Keplerian system in scaled units. The closed forms v = √(GM/r) and T = 2π·√(r³/GM) assume the same idealizations, so they cancel rather than contributing to the residual orbital speed or period. The remaining gap is therefore purely numerical, not physical.

Further Exploration