I implemented a toy rigid body simulation knocking a bunch of balls around with my mouse that are constrained (boundary conditions) to a cube. I built a position based dynamics physics engine in C++ and rendered wireframes in my homebrew C++ OpenGL framework and solved constraints with Jacobi iterations (use a better solver...it'll be more stable!).

...

All rights reserved Benjamin Ahlbrand 2022