soft_body_anatomy
A rigid-body is a single moving frame: the position and the velocity of any of its points follow from one translation and one rotation. This is precisely what a deformable body can't be, because its parts must be able to move (somewhat) independently of each other. Instead, a soft-body is made of particles, aka. mass points, i.e., points without any orientation, each having 2 degrees of freedom in 2D and 3 in 3D. The more particles a body is made of, the more detailed its deformations can be, and the more expensive it is to simulate.
The particles are kept together by a lattice made of up to three kinds of elements:
- The particles are the only mandatory element, i.e., the positions the
SoftBodyBuilderSoftBodyBuilder(wrapped by theSoftBodycomponent)SoftBodyDescR3SoftBodyDesc is built from. They carry the mass and the velocity of the body.SoftBodyBuilder - The edges (
edgessetEdgesedges ) connect two particles. The structural edges resist the stretching (and the compression) of the body, whereas the bending edges (edgesbend_edgessetBendEdgesbendEdges ) and the dihedral constraints (bend_edgesdihedralssetDihedralsdihedrals , 3D) resist its bending.dihedrals - The cells (
cellssetCellscells ) connect three particles in 2D (triangles) and four in 3D (tetrahedra). They resist the deformation of the area (2D) or of the volume (3D) they cover.cells
Two more concepts describe how the body interacts with the rest of the world. The surface
(surfacesetSurfacesurfacesurfacewiresetWirewire, 3DwireskinsetSkinskinVertices and skinIndicesskin
Every element can be given manually to the soft-body (E, 2) for the edges and (C, 4) for the cells), or as sequences of tuples, and replace the elements generated by the constructor (see also add_edges).