Overview of d3-force-3d
masterd3-force-3d is an extended version of d3-force that supports multi-dimensional simulations (1D, 2D, or 3D) via the numDimensions method. It is fully backwards compatible with d3-force (v3.0.0) and acts as a drop-in replacement.
The module uses a velocity Verlet numerical integrator to simulate physical forces on particles. It assumes a constant unit time step (Δt = 1) and constant unit mass (m = 1) for all particles. This makes force equivalent to constant acceleration, which is applied to velocity and then to position.
Common use cases include:
- Force-directed graphs and trees (networks and hierarchies).
- Collision detection for bubble charts or beeswarm plots.
- Rudimentary physics engines (e.g., simulating cloth/lattices).
- Multi-dimensional spatial simulations.