infinity_constraint: Reposition particles outside a canvas so they wrap around

infinity_constraintR Documentation

Reposition particles outside a canvas so they wrap around

Description

This constraint keeps particles inside of a defined area by positioning exiting particles on the other side of the area. In effect this makes particles that moves outside the upper bound reenter at the lower bound and vice versa.

Training parameters

The following parameters defines the training of the constraint and can be passed along a call to impose()

  • xlim : The left and right bound of the area

  • ylim : The upper and lower bound of the area

See Also

Other constraints: dominator_constraint, path_constraint, polygon_constraint, velocity_constraint, x_constraint, y_constraint


thomasp85/particles documentation built on Sept. 1, 2022, 2:43 p.m.