| field_force {particles} | R Documentation |
Apply a vector field to particles
Description
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.
Training parameters
The following parameters defines the training of the force and can be passed
along a call to wield()
-
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 ifxandyare missing. -
vel: A single numeric or a matrix of the same dimensions asanglegiving 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.
See Also
Other forces:
center_force,
collision_force,
link_force,
manybody_force,
map_force,
mean_force,
random_force,
reset_force,
trap_force,
x_force,
y_force