contourToBody
Converts a given shape contour into a physical body representation with configurable nodes and links.
The function creates a series of nodes based on equidistant positions along the contour and connects them using links to form a flexible structure. Additional neighbor links can be added for increased connectivity. The resulting Body can be further configured using the provided configure block.
Return
a Body instance representing the given contour with nodes and links.
Parameters
the shape contour to be converted into a physical body representation.
the density of nodes along the contour, defining the spacing between nodes. Default is 10.0.
the number of additional neighboring links to create for each node. Default is 1.
a lambda to configure the resulting Body instance.