Skip to main content

Gravity orbits: initial speed, inclination and ellipses

Open the orbital playground. Change initial speed to turn a near-circle into an ellipse, or change inclination to reveal the orbital plane. NASA’s introduction to gravity and mechanics provides the physical background.

Controls

Drag to orbit the camera and use the wheel to zoom. With the canvas focused, arrow keys rotate the view. Camera interaction uses Three.js OrbitControls and remains available while paused.

Initial speed ranges from 0.60.6 to 1.31.3, inclination from 00^\circ to 9090^\circ. Either slider relaunches from the same point and clears the trail. Presets use Circular (1,20)(1,20^\circ), Elliptic (0.75,35)(0.75,35^\circ) and Polar (1,90)(1,90^\circ). Step advances 1/601/60 model time units; Reset restores the default circular parameters.

Central gravity

The central body is fixed and does not respond to the satellite. The normalized gravitational parameter is μ=GM=1\mu=GM=1:

r¨=rr3.\ddot{\mathbf r}=-\frac{\mathbf r}{\lVert\mathbf r\rVert^3}.

Initial radius is 1 and velocity is perpendicular to it, giving circular speed 1. Escape speed is 2\sqrt{2}, above the slider maximum, so all selectable trajectories are bound. Inclination changes the orbital plane without changing energy.

Velocity Verlet advances position and velocity with four 1/2401/240 substeps per simulation update. Initial conditions give the semi-major axis and eccentricity:

a=12v02,e=1v02.a=\frac{1}{2-v_0^2},\qquad e=\left|1-v_0^2\right|.

Reading the scene

The upper-left readout shows current distance rr, current speed vv and eccentricity ee calculated from the initial state. The arrow indicates velocity direction. The fading trail retains 1,200 update positions; the dashed guide is one orbit precomputed from the initial state with the same integrator, not a second satellite.

Procedural textures, lighting, an atmosphere shell and reference rings provide depth cues. The displayed planet radius does not enter the gravity calculation. There is no surface collision detection, drag, propulsion or multi-body perturbation. The displayed surface is only a visual reference; point-mass gravity determines the trajectory.

As with the double pendulum, physics updates are separate from drawing. A model test checks return error after one unit circular orbit; decorative shading does not affect integration.

Explore connectionsOpen network