Commit Graph

248 Commits

Author SHA1 Message Date
Mike Bostock
8db7cbdf6c Fix #30 - normalize link force per node. 2016-05-11 19:34:49 -07:00
Mike Bostock
0ae4a1b6b9 Update README. 2016-05-10 11:02:40 -07:00
Mike Bostock
9f3116bb18 0.6.0 2016-05-10 10:56:22 -07:00
Mike Bostock
093d16de68 Prepare for minor release. 2016-05-10 10:56:19 -07:00
Mike Bostock
8c86ea74f0 Update README. 2016-05-10 10:41:29 -07:00
Mike Bostock
4d36b90eb9 Update README. 2016-05-10 10:21:46 -07:00
Mike Bostock
41044c8be2 Update README. 2016-05-10 10:20:49 -07:00
Mike Bostock
92a496559a Update README. 2016-05-10 10:20:34 -07:00
Mike Bostock
d486875516 Update README. 2016-05-10 10:20:07 -07:00
Mike Bostock
275f4b2bea Update README. 2016-05-10 10:19:42 -07:00
Mike Bostock
f70a40f78d Default to the node’s current position.
Nice!
2016-05-10 10:15:17 -07:00
Mike Bostock
add1373738 Replace d3.forceFix with simulation.{fix,unfix}.
This feels a bit cleaner since you don’t need to track the name of the fixing
force externally. It also enforces that fixing happens after the application of
any forces.
2016-05-10 10:08:25 -07:00
Mike Bostock
a4153e77fd Add d3.forceFix. Fixes #27. 2016-05-10 09:49:20 -07:00
Mike Bostock
453e316240 Update README. 2016-05-09 14:03:40 -07:00
Mike Bostock
56cb60237a Update README. 2016-05-09 14:02:24 -07:00
Mike Bostock
feb593fa2b Update README. 2016-05-09 13:59:44 -07:00
Mike Bostock
f218ca2f6d Update README. 2016-05-09 13:59:15 -07:00
Mike Bostock
d767dcfcf9 Update README. 2016-05-09 13:58:37 -07:00
Mike Bostock
8a2c8590bb Add simulation.alphaTarget.
This lets you set the “desired” alpha for the simulation, and have the
simulation smoothly interpolate towards the desired value. By default, the
target value is zero, such that the simulation cools. However, by setting it to
a non-zero value, such as during a drag interaction, you can also use it to have
the simulation heat. Fixes #26.

This commit also changes simulation.restart so that it no longer resets the
alpha to one, and changes the meaning of simulation.alphaDecay. The new default
alphaDecay now cause the simulation to end after 300 ticks, instead of 345.
2016-05-09 13:41:33 -07:00
Mike Bostock
85b0b09d34 Minor optimization.
Don’t test the bounding box on leaf nodes; test the circles.
2016-05-04 08:40:17 -07:00
Mike Bostock
f15a5adad7 Process collisions serially.
It’s tempting to do them independently (in parallel), but this makes convergence
much slower. We’re now moving nodes while they’re in the quadtree, which means
we could miss a few collisions; but since the tree is rebuilt on each iteration
that should probably be fine.

This reverts part of 95354e8470, though it retains
the area-biased resolution and the performance improvements.
2016-05-04 07:32:18 -07:00
Mike Bostock
4cec18385d Style. 2016-05-04 07:31:42 -07:00
Mike Bostock
ca3aecc94e Tiny optimization. 2016-05-03 22:29:50 -07:00
Mike Bostock
563481bb5a Tiny optimization. 2016-05-03 16:15:55 -07:00
Mike Bostock
95354e8470 Improve collision detection.
Fix #25. We now resolve collisions for all nodes independently, rather than
moving one node at a time. And since we’re not mutating the quadtree while
resolving, the quadtree can now store the maximum radius for each quadrant,
accelerating search! We can also optimize resolution a little bit since now
resolutions are always symmetric.

Collision resolutions are now biased so that the acceleration is inversely
proportional to the circle’s area, such that larger circles (which are more
likely to overlap many small circles) are more stable.

Also: only jiggle if two circles are overlapping.
2016-05-03 16:07:44 -07:00
Mike Bostock
a55cff0320 Update README. 2016-05-02 15:43:32 -07:00
Mike Bostock
2cab3adafe Update README. 2016-05-02 15:26:25 -07:00
Mike Bostock
a2a01c5cf6 Update README. 2016-05-02 15:25:37 -07:00
Mike Bostock
3ee7362dc0 Update beeswarm. 2016-04-29 14:13:04 -07:00
Mike Bostock
eed421a602 Update README. 2016-04-29 11:09:15 -07:00
Mike Bostock
57c49b5fdb Update README. 2016-04-29 11:08:36 -07:00
Mike Bostock
3f7234064b Add Beeswarm example. 2016-04-29 11:08:13 -07:00
Mike Bostock
1789648299 0.5.0 2016-04-29 10:46:54 -07:00
Mike Bostock
d62e947d71 Prepare for minor release. 2016-04-29 10:46:51 -07:00
Mike Bostock
15d5bb7d5b Separate dimensions for coincidence test.
Fixes #23. This doesn’t catch all degenerate configurations, such as when x = y,
but it at least handles a common case for geometric constraints. As an added
bonus, this commit avoids extraneous jiggling in the many-body force when
visiting testing the target node’s quadtree cell.
2016-04-29 10:38:16 -07:00
Mike Bostock
a1ee534c57 Separate d3.forcePosition into d3.force{X,Y}. 2016-04-29 09:40:12 -07:00
Mike Bostock
cf287b8dba Fix exact coincidence with d3.forceCollide. 2016-04-29 09:33:17 -07:00
Mike Bostock
75284e0e28 0.4.1 2016-04-28 15:24:32 -07:00
Mike Bostock
3add8cb634 Fix initialization bug. 2016-04-28 15:24:29 -07:00
Mike Bostock
d56fba328c 0.4.0 2016-04-28 15:18:58 -07:00
Mike Bostock
e12cb5c369 Prepare for minor release. 2016-04-28 15:18:56 -07:00
Mike Bostock
86ed498c5c Update README. 2016-04-28 15:17:49 -07:00
Mike Bostock
853d4c31f5 Update README. 2016-04-28 15:17:32 -07:00
Mike Bostock
9ee87d7f1a Update README. 2016-04-28 15:17:22 -07:00
Mike Bostock
7bfbbcf892 Update README. 2016-04-28 15:17:06 -07:00
Mike Bostock
629f223bd9 Update README. 2016-04-28 15:16:11 -07:00
Mike Bostock
d078bba429 Update README. 2016-04-28 15:14:32 -07:00
Mike Bostock
ff9bb579f9 Update README. 2016-04-28 14:57:22 -07:00
Mike Bostock
2a9de567a3 Update README. 2016-04-28 14:57:07 -07:00
Mike Bostock
8d845aca55 Update README. 2016-04-28 14:56:04 -07:00