Class VerletConstrainedSpring2D

java.lang.Object
toxi.physics2d.VerletSpring2D
toxi.physics2d.VerletConstrainedSpring2D

public class VerletConstrainedSpring2D extends VerletSpring2D
Implements a spring whose maximum relaxation distance at every time step can be limited to achieve better (if physically incorrect) stability of the whole spring system.
  • Field Details

    • limit

      public float limit
      Maximum relaxation distance for either end of the spring in world units (by default unlimited until set by user)
  • Constructor Details

    • VerletConstrainedSpring2D

      public VerletConstrainedSpring2D(VerletParticle2D a, VerletParticle2D b, float len, float str)
      Parameters:
      a -
      b -
      len -
      str -
    • VerletConstrainedSpring2D

      public VerletConstrainedSpring2D(VerletParticle2D a, VerletParticle2D b, float len, float str, float limit)
      Parameters:
      a -
      b -
      len -
      str -
      limit -