diff --git a/README.md b/README.md index bf24aef..616bca5 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,17 @@ This module implements a [velocity Verlet](https://en.wikipedia.org/wiki/Verlet_integration) numerical integrator for simulating physical forces on particles. The simulation is simplified: it assumes a constant unit time step Δ*t* = 1 for each step, and a constant unit mass *m* = 1 for all particles. As a result, a force *F* acting on a particle is equivalent to a constant acceleration *a* over the time interval Δ*t*, and can be simulated simply by adding to the particle’s velocity, which is then added to the particle’s position. -In the domain of information visualization, physical simulations are useful for studying [networks](http://bl.ocks.org/mbostock/ad70335eeef6d167bc36fd3c04378048) and [hierarchies](http://bl.ocks.org/mbostock/95aa92e2f4e8345aaa55a4a94d41ce37)! +In the domain of information visualization, physical simulations are useful for studying [networks](https://observablehq.com/@d3/force-directed-graph) and [hierarchies](https://observablehq.com/@d3/force-directed-tree)! -[Force Dragging III](http://bl.ocks.org/mbostock/ad70335eeef6d167bc36fd3c04378048)[Force-Directed Tree](http://bl.ocks.org/mbostock/95aa92e2f4e8345aaa55a4a94d41ce37) +[Force-Directed Graph](https://observablehq.com/@d3/force-directed-graph)[Force-Directed Tree](https://observablehq.com/@d3/force-directed-tree) -You can also simulate circles (disks) with collision, such as for [bubble charts](http://www.nytimes.com/interactive/2012/09/06/us/politics/convention-word-counts.html) or [beeswarm plots](http://bl.ocks.org/mbostock/6526445e2b44303eebf21da3b6627320): +You can also simulate circles (disks) with collision, such as for [bubble charts](http://www.nytimes.com/interactive/2012/09/06/us/politics/convention-word-counts.html) or [beeswarm plots](https://observablehq.com/@d3/beeswarm): -[Collision Detection](http://bl.ocks.org/mbostock/31ce330646fa8bcb7289ff3b97aab3f5)[Beeswarm](http://bl.ocks.org/mbostock/6526445e2b44303eebf21da3b6627320) +[Collision Detection](https://bl.ocks.org/mbostock/31ce330646fa8bcb7289ff3b97aab3f5)[Beeswarm](https://observablehq.com/@d3/beeswarm) You can even use it as a rudimentary physics engine, say to simulate cloth: -[Force-Directed Lattice](http://bl.ocks.org/mbostock/1b64ec067fcfc51e7471d944f51f1611) +[Force-Directed Lattice](https://bl.ocks.org/mbostock/1b64ec067fcfc51e7471d944f51f1611) To use this module, create a [simulation](#simulation) for an array of [nodes](#simulation_nodes), and compose the desired [forces](#simulation_force). Then [listen](#simulation_on) for tick events to render the nodes as they update in your preferred graphics system, such as Canvas or SVG. @@ -21,9 +21,9 @@ To use this module, create a [simulation](#simulation) for an array of [nodes](# If you use NPM, `npm install d3-force`. Otherwise, download the [latest release](https://github.com/d3/d3-force/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-force.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3_force` global is exported: ```html - - - + + +