|
0.000 ms per frame, dt = 1/60 s, g = -10 m/s2 Number of links: 3 Number of sub-steps: 50
Edge damping coefficient (Ns/m) 0.0 Global damping coefficient (Ns/m) 0.0 Enforce energy conservation Collision handling Show trail Force labels |
This pendulum simulation shows single step XPBD in action. Two small modifications in our original position based dynamics method PBD turns the latter from a toy used in games into a serious competitor of physical simulation methods even surpassing their accuracy while staying as simple as PBD. We describe the method here. The pendulum simulation showcases the following features: It handles stiff systems with large mass ratios. (Zero compliance means infinite stiffness). It shows high frequency details and a high level of energy conservation both of which are difficult to achieve with implicit global solvers. All quantities have physical units and internal forces can easily be evaluated. It removes the conceptual differences of PBD to the backward Euler method. It also generalizes beyond the distance constraints we show here.
The challenge is to beat our method in terms of simplicity, speed, stability or accuracy. The html document you see here is self-contained. It includes the GUI, the rendering and the complete simulation code. You can have a look at it here. The solver itself only takes 100 lines of code (lines 460-560) which you can simply replace it with your own solution.