I explain all the derivations necessary to understand the basics of 3D rigid body physics intuitively and show how I implemented them from scratch in C/C++.
Links to the listed references
Physically Based Modeling
https://graphics.pixar.com/pbm2001/
or for a combined pdf
https://graphics.stanford.edu/courses/cs448b-00-winter/papers/phys_model.pdf
My derviation for the derivative of the rotation matrix is based on theirs.
Physics, Part 1: The Next Frontier
https://chrishecker.com/Rigid_Body_Dynamics
I had the idea to derive the linear motion of the rigid body from the linear momentum as a result of reading his first article.
Outro music
https://www.youtube.com/watch?v=nkNreNOpVUs&t=1304s
Thank you @MikelTBE for letting others use your amazing songs.
I love listening to your Zelda & Chill albums while working on my projects.
Game libraries so far:
SDL (windowing, input/event handling, audio)
glad (loading OpenGL functions)
Dear ImGUI (debug gui)
stb image (image loading)
0:00 Intro
1:20 Rigid body model
2:30 Mass computation
5:24 Linear motion
9:29 Linear motion implementation 1
10:56 Explicit Euler integration
14:35 Linear motion implementation 2
16:42 Rigid body orientation
18:39 Angular velocity
23:34 Angular velocity implementation
23:59 Angular momentum
30:11 Inertia intuition
36:12 Angular motion implementation
38:49 Results and comparisons
41:15 The end
#physics #simulation #gamedev