InteractiveComputerGraphics / PositionBasedDynamics

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

Directly Manipulate position #116

Closed blacksino closed 2 years ago

blacksino commented 2 years ago

Hi,I am a new to PositionBaseDynamics,I am tring to simulate defomation of human organs by PBD,I was wondering if there is a possible solution to manipulate specific vertex's positions in tetrahedron mesh to make the mesh gradually deform to target shape by using FEMTetraConstraint and pre-define shape constraint,if so, how to implement such pre-define shape constraint? For example,If I want to transform a sphere into an ellipsoid gradually , should I sample some points uniformly on the sphere, and then give the target positions of these sampling points, and then project the FEM tetrahedron constraints and the target position constraints of the sampling points separately?