InteractiveComputerGraphics / PositionBasedDynamics

PositionBasedDynamics is a library for the physically-based simulation of rigid bodies, deformable solids and fluids.
MIT License
1.93k stars 365 forks source link

Strange Stretch/shear constraint behavior #66

Closed Arkano closed 5 years ago

Arkano commented 6 years ago

Hi,

In the CosseratRod sample scene, setting both bending stiffnesses and torsion stiffness to zero (so that only stretch/shear constraints take effect) and reducing the segment length by one order of magnitude (in the source code) causes very weird behavior of the rod, twisting around itself in a snake-like fashion instead of swinging freely. Only when the rod elements are long enough does the rod behave as expected.

Could this be caused by the inertia tensor of the rod being approximated by a scalar weight? Or is it a bug in the implementation?