Orbital Trajectory
An interactive simulation of orbital trajectories shows a blue satellite orbiting a central red mass, with its path traced as a dotted trail on a canvas. The velocity slider adjusts the satellite’s initial tangential speed relative to orbital velocity, demonstrating circular, elliptic, or hyperbolic paths based on gravitational physics. The number of trajectory sample points is also user-controllable. The visualization uses `d3.forceSimulation` with `d3.forceMagnetic` to model gravity, rendering the trail via Canvas `fillRect` calls and the satellite as an SVG circle.
AI-generated descriptionA simulation of orbital trajectories using the d3-force simulation engine with the gravity-like d3-force-magnetic attraction force.
The initial tangential velocity of the blue orbiting body can be set relative to its orbital speed, calculated as √(GM/d).
A factor of 1x (default) results in a perfectly circular orbit. Approaching the factor of √2x reaches the body's escape velocity, causing the body to drift away from the central object's gravity pull in an hyperbolic trajectory.
Factors below 1 will cause a quicker fall of the blue body towards the attracting center, yielding elliptic orbits with increasing eccentricity.
The length of the pre-estimated trajectory can be manipulated by changing the number of samples (represented as dots).
See also Force-simulated Solar System and Hierarchical Orbits.
forked from <a href='http://bl.ocks.org/vasturiano/'>vasturiano</a>'s block: <a href='http://bl.ocks.org/vasturiano/2da88fb89cc75d18b20d8a7776fd6860'>Orbital Trajectory</a>