Discussion of all possible constraint combinations

I’m trying to wrap my head around Physics Constraints. I hope this starts a discussion we all can learn from. I think there are 20 possible constraint types, including LOCK and 6DOF. This boils down to 18 interesting ones. BABYLON/Havok only names 5 of these 18. The following table shows all possible combinations of locked degrees of freedom. From two other sources, documentation from COMSOL, and a 2005 academic paper. COMSOL has some nice pictures and pretty detailed explanations linked from their page.

The left column “DIDACTIC” is the name given by the paper, the second column is BABYLON/Havok’s name, and (in lowercase) the name from COMSOL. Duplicatecor alternate COMSOL names are not shown.

DIDACTIC Babylon/Havok (comsol) Lx Ly Lz Ax Ay Az DoF
LOCK 0
revolute HINGE 1
prismatic PRISMATIC 1
2
slotted spheric vs. toric? universal 2
cylindrical SLIDER 2
slotted-cylindric? reduced slot 2
3
spheric BALL_AND_SOCKET 3
3
planar? planar 3
3
sphere-slotted cylinder 3
cylinder-plane 4
4
4
sphere-groove slot 4
sphere-plane 5
5
6DOF 6


(Image from “DETC2005-84109 ON THE COMPUTATION OF DEGREES-OF-FREEDOM : A DIDACTIC PERSPECTIVE” by E. Pennestrì, M. Cavacece, L. Vita, Published 2005.

Interestingly, there are two different names/implementations of 2 angular degrees of freedom in the paper: slotted spheric and toric. What’s the difference in these?

I’m trying to create a playground to help my understanding. In the meantime, there’s these two:

1 Like

Wow, there are so many joint types I didn’t know about :open_mouth: Thank you for the detailed list!

A small addition: For spheric/ball-and-socket joints, there are twist (e.g. X) and swing (Y and Z) angles. If you want limits for the 2 swing angles, the limits can have a cone or pyramid shape.

I don’t have a good image for this - the best I could find online is https://scaron.info/images/friction-cones.png. I should be able to take a video of these 2 limit shapes and share it in your post today

1 Like

Interesting. I left out definitions of limits because I wanted to focus on joint attachments only. Are any of these joints fundamentally altered by limits?

I think Havok only natively implements pyramid-shaped, right? Calculated interdependent limits would be interesting. Or maybe distance from a line in addition to distance from a point.

Hmmm. Maybe could combine phantom objects and distance joints to construct different limit “types.”

2 Likes

Got it! The joints shouldn’t be fundamentally altered by limits.

You’re right in that the public Havok API we have access to only has the pyramid limit. Maybe the full Havok source has the cone limit.

Edit 3: Here’s the best demo: tap to impart force. All combinations shown:

Here are my previous attempts:
/end Edit3.

Tool to play with any combination of LOCKED Axes is now in the playground. Change one line of code (line 99) to enable/disable axis locks. Tap the screen to impart a random force on the yellow box.

Edit: here’s a full array of all constraint “types”. I’m having trouble with setting a joint’s limits after creation, so there are no linear limits here. Touch the screen to impart a force.

I’m not totally sure this is useful, yet. But it does demonstrate how to change an axisMode between LOCK and FREE after constraint creation.

Edit 2: Here’s a better one where the initial offset of the yellow box is diagonal. It shows how locking a particular linear axis aligns those axes between parent and child (i.e. aligning the defined axis’, perps, or normals of both bodies).