Specifications

171
Type = Bspline;
BsplineOrder = 4;
FileName = "P1.txt";
AnyKinMeasure &Lin = .M1Lin;
// MeasureOrganizer = {0};
Reaction.Type = {On, On, On};
};
AnyKinEq MarkerBodyConstraint = {
AnyKinLinear lin = {
AnyRefFrame &Marker = ..M1;
AnyRefFrame &Body = ..Pendulum.P1;
};
MeasureOrganizer = {0};
};
This brings us exactly back to where we started. If you have done everything right, you now have a model
that oscillates like it did at the end of the preceding section. So, why did we go to all that trouble for
nothing? Well, the new approach has two advantages:
1. You do not have to edit columns out of the marker trajectory file if you only want to drive one
degree of freedom. The degrees of freedom to drive are controlled by the link between the marker
and the corresponding point on the body.
2. It allows you to drive the body using local instead of global coordinates.
The second advantage is what will justify the trouble of setting the system up; it is going to allow us to drive
the pendulum correctly also for larger displacements. As the picture indicates, the pendulum has its own
local reference frame that moves with it. As you can se in the figure, this reference frame has its x axis
perpendicular to the length axis of the pendulum and therefore directed along the movement, no matter
which position the pendulum has. So, even when the pendulum has large oscillations, the local x direction
remains a good direction for driving the pendulum.
Let us try to do precisely that. Please download and save this file in the same directory as the model: P2.txt
.
Then make the following change:
AnyKinEqInterPolDriver M1Driver = {
Type = Bspline;
BsplineOrder = 4;
FileName = "P2.txt";
AnyKinMeasure &Lin = .M1Lin;