A simulation of orbital trajectories using the d3-force simulation engine with the gravity-like d3-force-magnetic attraction force.
By default the layout represents a binary system. All the stars (red nodes) have the same mass and their attraction influence on the satellite (blue node) is proportional to the inverse-square of the distance. The stars are statically positioned and remain unaffected by either the satellite or other stars. Stars can be added and removed by double-clicking on canvas/nodes. All nodes can also be repositioned by dragging.
The initial velocity (and direction) of the satellite can be changed using the controls on the top-right. The length of the pre-estimated trajectory can be manipulated by changing the number of samples (represented as dots).
See also Single Orbital Trajectory.
https://cdnjs.cloudflare.com/ajax/libs/d3/4.11.0/d3.min.js
https://unpkg.com/d3-force-magnetic
https://unpkg.com/kapsule
https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.5/dat.gui.min.js