This force adjusts the velocity of particles based on a supplied vector field. The vector field can either be specified using x and y velocities, or angle and magnitude. Velocity adjustments are calculated based on a bilinear interpolation.
The following parameters defines the training of the force and can be passed
along a call to
x : A matrix giving the velocity in the x direction at each grid point
y : A matrix giving the velocity in the y direction at each grid point
angle : A matrix giving the direction of the velocity at each grid point.
Will only be considered if
y are missing.
vel : A single numeric or a matrix of the same dimensions as
giving the magnitude of velocity at each grid point.
xlim : The coordinate span of the vector field in the x direction.
ylim : The coordinate span of the vector field in the y direction.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.