Specifications

170
to the path of the pendulum regardless of which direction the pendulum has. But before we can make that
shift, we shall implement the smart way of picking a degree of freedom to drive that we promised in the
preceding section. The idea is based on definition of a new segment representing the MOCAP marker:
AnyKinEqInterPolDriver P1Driver = {
Type = Bspline;
BsplineOrder = 4;
FileName = "P2x.txt";
AnyKinMeasure &Lin = .P1Lin;
MeasureOrganizer = {0};
Reaction.Type = {Off};
};
AnySeg M1 = {
Mass = 0;
Jii = {0, 0, 0}/10;
};
The new segment has no mass and no rotational inertia. The first thing to do is to lock its rotation, and the
most compact way of doing it is this:
AnySeg M1 = {
Mass = 0;
Jii = {0, 0, 0}/10;
};
AnyKinEq RotLock = {
AnyKinRotational rot = {
Type = RotAxesAngles;
AnyRefFrame &ground = ..GlobalRef;
AnyRefFrame &Marker = ..M1;
};
};
Now the marker can only translate, and we shall drive it in all three translations by means of the original
MOCAP'ed data:
AnyKinLinear M1Lin = {
//Ref = -1;
AnyRefFrame &LabOrigin = .GlobalRef;
AnyRefFrame &M1 = .M1;
};
AnyKinEqInterPolDriver M1Driver = {
Type = Bspline;
BsplineOrder = 4;
FileName = "P1.txt";
AnyKinMeasure &Lin = .M1Lin;
// MeasureOrganizer = {0};
Reaction.Type = {On, On, On};
};
There are several things to notice here: We have created a new linear measure between the laboratory and
the marker segment, M1. Then we have modified the interpolation driver pretty much back to what it was
when we first defined it with the exception that it now drives M1 instead of the pendulum, and it does so
using all three coordinates. Notice also that the reactions are on. This is because when we start making
kinetic analysis, we cannot have a segment floating freely in the air with nothing to keep it in place.
Now all that is missing is to create a link between M1 and the pendulum:
AnyKinEqInterPolDriver M1Driver = {