diff --git a/docs/network/physics.html b/docs/network/physics.html index e09153e9..65fb8020 100644 --- a/docs/network/physics.html +++ b/docs/network/physics.html @@ -92,6 +92,14 @@ var options = { springConstant: 0.04, damping: 0.09 }, + forceAtlas2Based: { + theta: 0.5, + gravitationalConstant: -800, + centralGravity: 0.01, + springConstant: 0.08, + springLength: 100, + damping: 0.4 + }, repulsion: { centralGravity: 0.2, springLength: 200, @@ -135,13 +143,23 @@ network.setOptions(options);
All of the individual options are explained here:
name | type | default | description |
barnesHut | Object | Object | BarnesHut is a quadtree based gravity model. This is the fastest, default and recommended solver for non-hierarchical layouts. |
barnesHut | Object | Object | BarnesHut is a quadtree based gravity model. This is the fastest, default and recommended solver for non-hierarchical layouts. |
barnesHut.gravitationalConstant | Number | -2000 | Gravity attracts. We like repulsion. So the value is negative. If you want the repulsion to be stronger, decrease the value (so -10000, -50000). |
barnesHut.centralGravity | Number | 0.3 | There is a central gravity attractor to pull the entire network back to the center. |
barnesHut.springLength | Number | 95 | The edges are modelled as springs. This springLength here is the the rest length of the spring. |
barnesHut.springConstant | Number | 0.04 | This is how 'sturdy' the springs are. Higher values mean stronger springs. |
barnesHut.damping | Number | 0.09 | Accepted range: [0 .. 1] . The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration. |
forceAtlas2Based | Object | Object | Force Atlas 2 has been developed by Jacomi et al (2014) for use with Gephi. The forceAtlas2Based solver makes use of some of the equations provided + by them and makes use of the barnesHut implementation in vis. The main differences are the central gravity model, + which is here distance independent, and the repulsion being linear instead of quadratic. Finally, all node masses have a + multiplier based on the amount of connected edges plus one. |
forceAtlas2Based.gravitationalConstant | Number | -800 | This is similar to the barnesHut method except that the falloff is linear instead of quadratic. The connectivity is also taken into account as a factor of the mass. If you want the repulsion to be stronger, decrease the value (so -1000, -2000). |
forceAtlas2Based.centralGravity | Number | 0.01 | There is a central gravity attractor to pull the entire network back to the center. This is not dependent on distance. |
forceAtlas2Based.springLength | Number | 100 | The edges are modelled as springs. This springLength here is the the rest length of the spring. |
forceAtlas2Based.springConstant | Number | 0.08 | This is how 'sturdy' the springs are. Higher values mean stronger springs. |
forceAtlas2Based.damping | Number | 0.4 | Accepted range: [0 .. 1] . The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration. |
repulsion | Object | Object | The repulsion model assumes nodes have a simplified repulsion field around them. It's force linearly decreases from 1 (at 0.5*nodeDistance and smaller) to 0 (at 2*nodeDistance). |
repulsion.nodeDistance | Number | 100 | This is the range of influence for the repulsion. |
repulsion.centralGravity | Number | 0.2 | There is a central gravity attractor to pull the entire network back to the center. |
maxVelocity | Number | 50 | The physics module limits the maximum velocity of the nodes to increase the time to stabilization. This is the maximium value. |
minVelocity | Number | 0.1 | Once the minimum velocity is reached for all nodes, we assume the network has been stabilized and the simulation stops. |
solver | String | 'barnesHut' | You can select your own solver. Possible options: 'barnesHut', 'repulsion', 'hierarchicalRepulsion' . When setting the hierarchical layout, the hierarchical repulsion solver is automaticaly selected, regardless of what you fill in here. |
solver | String | 'barnesHut' | You can select your own solver. Possible options: 'barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based' . When setting the hierarchical layout, the hierarchical repulsion solver is automaticaly selected, regardless of what you fill in here. |
stabilization | Object | Boolean | Object | When true, the network is stabilized on load using default settings. If false, stabilization is disabled. To further customize this, you can supply an object. |
stabilization.enabled | Boolean | true | Toggle the stabilization. This is an optional property. If undefined, it is automatically set to true when any of the properties of this object are defined. |
stabilization.iterations | Number | 1000 | The physics module tries to stabilize the network on load up til a maximum number of iterations defined here. If the network stabilized with less, you are finished before the maximum number. |