setSpookParams method
Recalculates a, b, and eps.
The Equation constructor sets typical SPOOK parameters as such:
stiffness
= 1e7relaxation
= 4timeStep
= 1 / 60, note the hardcoded refresh rate.
Implementation
void setSpookParams(double stiffness, double relaxation, double timeStep) {
final double d = relaxation;
final double k = stiffness;
final double h = timeStep;
a = 4.0 / (h * (1 + 4 * d));
b = 4.0 * d / (1 + 4 * d);
eps = 4.0 / (h * h * k * (1 + 4 * d));
}