Creation of a Pendulum (3/8)

Description

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.

Key points

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.

Type "FixedConstraint" into the Filter textbox in the Modeler. Drag and drop the FixedConstraint component over the FirstObject node. Then press the Run in SOFA button.

As debug information, we use pink squares to indicate the fixed particles.

Results

Press Animate.

The particle doesn't fall anymore.

Double click the FixedConstraint node in the Modeler's scene graph. Click on the Property 2/2 tab.

Here you can specify several indices corresponding to the particles to be constrained.

Press OK to return to the Modeler.

SOFA implements many different types of constraints. As with Gravity, there are examples in the Modeler that you can take a look at.


Previous ____________ Next