3 ms·
Do these type of physics engine use Newtonian F=MA at their hearts or do they rely on Lagrangian mechanics? My instinct tells me the first as it seems more str
by ur-whale 6y ago
Do these type of physics engine use Newtonian F=MA at their hearts or do they rely on Lagrangian mechanics?
My instinct tells me the first as it seems more straightforward, but then I realized I just have no idea.
Anyone knowledgeable care to enlighten?
- lasagnaphil 6y agoThe former, because in order to formulate a physics engine in Lagrangian mechanics you need analytic differentiation (or you can just precalculate the partial derivatives with your own hands, but then it will be precisely the same as coding it in F=ma.)
- sebcrozet 6y agoYes, it uses a Newtonian formulation. Another physics engine (nphysics) I wrote before rapier, had a Lagrangian formulation of joints (using reduced-coordinates). This is something I intend to add to Rapier too at some points.