Rigid body physics simulation math issue

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
NotASmurf
Messages
150
Reaction score
2
Hey all, I'm making a physics simulation for training an algorithm of mine, I'm running into issues on the rigid body physics simulation. Let's say I have a leg composed of a calf and a thigh. gravity will be acting on both, and the calf is attached to the thigh, Any suggestions on how I would go about calculating the new thigh and calf positions and rotations? Any help appreciated.

leg.png
 
Physics news on Phys.org
I think you need a connecting point like a joint so that as you rotate the thigh rectangle the joint rotates and/or changes position and then you use the joint's new position to calculate the position of the calf object.

So in your fig 1 diagram you need a red dot between to the two rectangles to represent the pivot point of the joint and you need a corresponding red dot in the fig 2 diagram.
 
they are connected, i just did not draw it in, sorry.