Module
Hylograph.Forces.ThreeD.ManyBody
- Package
- purescript-hylograph-forces
- Repository
- afcondon/purescript-hylograph-forces
The many-body force in three dimensions: every node attracts or repels every other, with the far field approximated by Barnes-Hut over an octree.
Ported from d3-force-3d 3.0.6, manyBody.js (MIT, Copyright 2017 Vasco
Asturiano; itself from d3-force, ISC, Mike Bostock); see LICENSE. The
shape is Hylograph.Forces.ManyBody's: build the tree, turn it into a
chain of clusters in d3's visiting order, walk the chain once per node.
Where d3-force-3d is more than d3-force with a third coordinate, in
accumulate:
- the summed strength of a cube with octants is scaled by
Math.sqrt(4 / 8)("according to number of dimensions"), at every level of the tree, so a far cluster pulls with a fraction of its nodes' strength that shrinks with its depth from the leaves; and - a child's centre is read as
q.x || 0(zero where it isNaN).
#defaultConfig Source
defaultConfig :: forall row. Config rowd3's defaults: strength -30, theta 0.9, distances from 1 to infinity.
- Modules
- Hylograph.
Forces - Hylograph.
Forces. Center - Hylograph.
Forces. Cohesion - Hylograph.
Forces. Collide - Hylograph.
Forces. Contain - Hylograph.
Forces. Directional - Hylograph.
Forces. Group - Hylograph.
Forces. Link - Hylograph.
Forces. Linkage - Hylograph.
Forces. ManyBody - Hylograph.
Forces. Measure - Hylograph.
Forces. Node - Hylograph.
Forces. Position - Hylograph.
Forces. Quadtree - Hylograph.
Forces. Radial - Hylograph.
Forces. Random - Hylograph.
Forces. RectCollide - Hylograph.
Forces. Snapshot - Hylograph.
Forces. ThreeD - Hylograph.
Forces. ThreeD. Center - Hylograph.
Forces. ThreeD. Collide - Hylograph.
Forces. ThreeD. Link - Hylograph.
Forces. ThreeD. ManyBody - Hylograph.
Forces. ThreeD. Node - Hylograph.
Forces. ThreeD. Octree - Hylograph.
Forces. ThreeD. Position - Hylograph.
Forces. ThreeD. Radial - Hylograph.
Forces. ThreeD. Tick - Hylograph.
Forces. Tick - Hylograph.
Forces. Towards