How to implement joints (like hinge joints).

Please don't post Bullet support questions here, use the above forums instead.
trigger
Posts: 1
Joined: Thu Apr 15, 2010 11:51 pm

How to implement joints (like hinge joints).

Post by trigger »

Basic point to point joints are simple to implement, as explained in Witkin/Baraff siggraph course notes & Chris Hecker's ponytail demo.

However, how to I implement more complicated joints, like hinge joints? (For example, in hinge joints, what is the constraint force to be applied that causes the two bodies rotations to be lined up? -- I want to use something better than just throwing in 2 point-point constraints).

Thanks!
bone
Posts: 231
Joined: Tue Feb 20, 2007 4:56 pm

Re: How to implement joints (like hinge joints).

Post by bone »

Well you've got one axis (the hinge axis) where the two bodies are allowed to rotate around each other freely. Since it is Free and it's like an Axle, we shall call it Axel F. Then you can take any two axes (let's call them A1 and A2) orthogonal to Axel F and to each other and prevent them from moving relative to each other, eliminating 2 DOFs.

So your Jacobian for those 2 angular DOFs is:

[0 A1 0 -A1]
[0 A2 0 -A2]

If you add your 3-DOF "point-to-point" constraint (more commonly known as a ball joint), it will act like a full 5-DOF hinge.