N-Body Problem II
✓ Published0🌍 Public
Mmbostock
Last edited May 2, 2016
Created on Feb 22, 2016
A swarm of 400 points orbits a central point in a dark canvas, with each point trailing a short line that encodes its instantaneous velocity as a color gradient from magenta to yellow. The simulation uses d3.forceSimulation with a d3.forceManyBody charge force and a d3.forceCenter constraint, while alphaDecay is set to zero so motion never settles. Rendering occurs on a Canvas 2D context, where each tick clears the frame and draws velocity-scaled strokes using d3.scaleLinear for color mapping.
AI-generated descriptiongpl-3.0 Licensed