Hacker News new | past | comments | ask | show | jobs | submit login

Depends on how you solve the constraints. The papers use an iterative method that might not converge to meet all constraints all the time but you can use others instead. In general though the constraint satisfaction is good enough with the iterative approach.

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.




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?


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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: