Soft Transform Constraint
Soft Transform Constraint is a type of constraint to control the motion of an affine body.
The state of an affine body is represented as:
\(\mathbf{p}\) is the position of the affine body and the \(\mathbf{a}_i\) are the rows of the affine transformation matrix.
#16 SoftTransformConstraint
The soft transform constraint energy has the form of "Kinetic" defined as
where \(\hat{\mathbf{q}}\) is the target state, \(\mathbf{M}\) is the mass matrix of the affine body, \(\eta_p \in (0,+\inf)\) is the position constraint strength ratio, and \(\eta_a \in (0,+\inf)\) is the affine (or rotation if not so rigorous) constraint strength ratio.
The reason we use strength ratio is that the mass matrix \(\mathbf{M}\) already contains the mass and inertia information, so that users only need to care about how strong the constraint is compared to the mass and inertia of the body, which is more intuitive.
Because the constraint is "SOFT", we don't allow a too-strong strength which will lead to numerical instability. Normally, \(\eta_p\) and \(\eta_a\) are better in the range of \([0, 100]\).