Computing the Inertia Tensor of a Triangle Mesh in C/C++ | Devlog Episode 6

I implemented a function that computes the inertia tensor of an arbitrary closed, non-overlapping triangle mesh with consistent face orientations in C/C++. The algorithm is based on three papers of which I explain the necessary derivations. Take a look at a C version of the code here https://github.com/blackedout01/simkn Join my Discord server   / discord   Links to the listed references Fast and Accurate Computation of Polyhedral Mass Properties https://www.cs.upc.edu/~virtual/SGI/d... the accompanying code can be downloaded on this website https://people.eecs.berkeley.edu/~jfc... Efficient Feature Extraction for 2D/3D Objects in Mesh Representation http://chenlab.ece.cornell.edu/Public... Explicit Exact Formulas for the 3-D Tetrahedron Inertia Tensor in Terms of its Vertex Coordinates https://thescipub.com/pdf/jmssp.2005.... Additional references Polyhedral Mass Properties (Revisited) https://www.geometrictools.com/Docume... Vector fields and divergence explained visually (not the actual title)    • Divergence and curl:  The language of Maxw...   The divergence theorem figure was taken from the corresponding article on Wikipedia https://en.wikipedia.org/wiki/Diverge... Outro music by @coffeedatelofi    • HYRULE CAFÉ ☕️ a cozy lofi Zelda mix by Co...   Thank you for letting people like me use your song in their videos. I like the corresponding album a lot and think that Skyloft is particularly underrated. 0:00 Intro 0:41 Fast and Accurate Computation of Polyhedral Mass Properties 9:31 Integral reduction alternative (signed sum) 12:14 Inertia of a general tetrahedron 19:51 Implementation for the given origin 24:01 Transformation to center of mass 28:06 Implementation for the center of mass 28:31 Applying the code 30:19 Results and comparisons 35:55 Code on GitHub 37:39 The end #physics #simulation #gamedev