Some people are really good ... See Khaled Gobashy for example, author of a framework for multibody simulation called Uraeus, available on github.

He wrote four detailed articles on LinkedIn to explain his approach

That looks promising !