The aim of this tutorial is to show the importance of topological components. Indeed, in this tutorial, two linear pendulums are represented, implying:
- A mechanicalObject with geometry point positions.
- A mass for gravity and fixed points.
- A mesh spring forcefield to create springs between points
- An ODE scheme and a linear solver to solve the system at each time step.
Key points
The only difference between the models is the MeshTopology component. In the first case, edges are defined. Thus, meshSpringForceField will know a list of edges where it will create springs. In the other case, no springs are created.
Results
Thus, when simulated, the first model will act as a pendulum, whereas in the other case, points will just fall down, as they are not attached together.