Download this file
AnyVar l0 = lr/(er+1); AnyVar eps0 = 0.03; AnyVar eps = (meas.Pos[0]-l0)/l0; AnyFloat Val = { iffun(gteqfun(eps,0.0), iffun(gtfun(eps,2*eps0),-k*(eps-eps0),-k*1/4*(eps^2/eps0)), 0.0) }; AnyVar EqStiffness = k/l0;