I think the constraints have not one solution. E.g. multiple overlapping polygons in 2D, how would you resolve that globally in a way such that the solution converges to the physical solution?
Re:Ten Minute Physics
by meheleventyone on Sunday December 11, 2022 @04:14AM
(#33941567)
Yup you can construct constraints such that they are impossible to solve. Solving using global methods can also end up in cases where the solver is going to take to long to solve for the simulation to remain real-time. Lots of trade offs to make based on what you’re trying to do.
I’m writing a physics engine in my spare time for fun using XPBD so here’s a look at the iterative method in action: https://youtu.be/A3_W_EFFsm8
This is running in Chrome at 60Hz with fifteen sub-steps, each with one constraint solver iteration.
Am currently integrating rigid bodies which is fun.