Physics Engine

February - March 2022


Source Code

Summary

Features

Reflection

This physics implementation is far from usable in a real scenario, but was extremely beneficial for learning about the topic over the period of 2 months.

The largest issue is the instability of the system, this is especially visible in spring & cloth simulations.
A major improvement can come from using a different integration method for resolving collisions, such as Runge-Kutta 4 instead of the current Verlet integration.

Warm starting is something to look into for future implementations, which caches the impulses applied during the collision resolution stage and uses it in the following physics step to converge towards the desired solution faster; this typically works best for objects that aren't moving much between frames.

Media