Creation of a Pendulum (4/8)

Description

We saw that when the scene is animated, the particle doesn't move, just like the first scene in this tutorial. However, contrary to the first scene, our scene now results in a simulation being launched, forces accumulated, and an ODE computes the new positions and velocities! To be sure of that, we will add one particle to the MechanicalObject. The particle of index "0" will still be constrained to its original position.

Double click the MechanicalObject node in the Modeler's scene graph. Click on the Vector 1/4 tab. At the top, you will see the position section.
By using the arrows on the right or typing in the box, change the 1 to "2". In the X, Y, and Z position of the new row of the matrix (with index 1), enter "1", "0", and "0", respectively.

We have resized the MechanicalObject, and added another particle at the position (1, 0, 0).

Results

Run the scene in SOFA and animate it.(If you don't see any particles, click and drag in the black area of the SOFA window. This changes the view of the particles, and should make them visible)

The particle marked by a pink square is still fixed, while the other falls due to gravity.


Previous ____________ Next