Simple position-based-dynamic(PBD) cloth model.
I follow the basic PBD algorithm [1].
Corner vertices are immobile and one middle vertex is moved externally,
so they are supposed to have infinite masses
For a distance constraint between adjacent vertices
In order to perform corrections of coordinates on GPU we need to divide
mesh edges into several groups with no adjacent edges. In this case different gpu processes would not change the same.
This is performed via coloring the edges according to greedy algorithm [2].
The maximum number of colors is
- Jan Bender, Matthias Müller, and Miles Macklin. 2017. A survey on position based dynamics, 2017. In Proceedings of the European Association for Computer Graphics: Tutorials. 1–31.
- P. Yu, Z. Zhao, R. Wang, J. Pan, Real-time soft body dissection simulation with parallelized graph-based shape matching on gpu, Comput. Methods Programs Biomed. 250 (2024),.

