Now that we managed to submit a particle to Gravity, let's try to fix a particle in space using a constraint. Several Sofa components implement the concept of constraints.
To fix a particle to its position, we use a filter based constraint called FixedConstraint. It sets to zero the velocities and acceleration of a set of particles.
As debug information, we use pink squares to indicate the fixed particles.
The particle doesn't fall anymore.
Here you can specify several indices corresponding to the particles to be constrained.
SOFA implements many different types of constraints. As with Gravity, there are examples in the Modeler that you can take a look at.