I'm having to write my own physics code (if you're curious why, see here). Simulating a single rigid body is pretty simple. But we have assemblies (simulated space colonies) which are composed of multiple rigid bodies, joined by rotating bearings.
A rotating bearing should keep two parts firmly in a constant relative position and spin axis, and allow them to vary only by rotation about that axis.
The primary mechanic for each part is the conservation of angular momentum. This sometimes causes the axis to change pretty dramatically (see here again for an example). But if one end or the other is attached to another object, then that object will either get dragged along or cancel out the axis change (or some combination of both -- depends on their relative mass). It's all further complicated by the fact that the other object may have angular momentum to conserve, too.
I have Physics for Game Developers, but it doesn't cover joints. I've searched the interwebs, but all I've been able to find are articles on using joints in various off-the-shelf physics engines. Can anyone offer advice on how to simulate such a bearing/joint myself?