A 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.
https://cdnjs.cloudflare.com/ajax/libs/d3/4.9.1/d3.min.js
https://unpkg.com/d3-force-magnetic