This force implements a n-body simulation using the Barnes-Hut approximation for improved performance. An n-body simulation calculates attraction or repulsion between all particles in a system based on their relative distances and each particles capacity and can thus mimick gravity or electrostatic repulsion.
The following parameters defines the training of the force and can be passed
along a call to
strength : The attractive or repulsive force of the particles. If
positive the particle attracts, if negative the particle repulses. The
default is -30. (tidy eval)
theta : The Barnes-Hut criterion governing the precision of the
approximation. If 0, no approximation is made. Defaults to 0.9.
min_dist : A lower distance threshold below which the forces will be
damped, in order to avoid explosive forces when two particles gets very
near each other.
max_dist : A distance threshold above which the forces between particles
are ignored. Using this will result in more local changes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.