API Docs for: 0.3.0
Show:

Equation Class

Base class for constraint equations.

Constructor

Equation

(
  • bi
  • bj
  • minForce
  • maxForce
)

Parameters:

  • bi Body

    First body participating in the equation

  • bj Body

    Second body participating in the equation

  • minForce Number

    Minimum force to apply. Default: -1e6

  • maxForce Number

    Maximum force to apply. Default: 1e6

Item Index

Methods

updateSpookParams

(
  • timeStep
)

Update SPOOK parameters .a, .b and .eps according to the given time step. See equations 9, 10 and 11 in the SPOOK notes.

Parameters:

  • timeStep Number

Properties

bi

Body

First body participating in the constraint

bj

Body

Second body participating in the constraint

maxForce

Number

Max force to apply when solving

minForce

Number

Minimum force to apply when solving

relaxation

Number

The number of time steps needed to stabilize the constraint equation. Typically between 3 and 5 time steps.

stiffness

Number

The stiffness of this equation. Typically chosen to a large number (~1e7), but can be chosen somewhat freely to get a stable simulation.