Binary Star System
This example visualizes the orbital trajectory of a satellite around a dynamically adjustable binary star system. Two red stars are fixed, while a blue satellite moves under an inverse-square attraction force, with its path traced as a dotted line. Users can add or remove stars by double-clicking, drag any node to reposition it, and adjust the satellite’s initial velocity or trajectory prediction length via a GUI. The simulation uses `d3.forceSimulation` with the `d3-force-magnetic` attraction force, rendering trails on a canvas and interactive elements as SVG, with controls built using `dat.GUI`.
AI-generated descriptionA 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.
forked from <a href='http://bl.ocks.org/vasturiano/'>vasturiano</a>'s block: <a href='http://bl.ocks.org/vasturiano/773c84f393afc98de3e99d551566481d'>Binary Star System</a>