Specifications

29
sRel = {0.05,0,0};
};
AnyRefNode DeltodeusB = {
sRel = {-0.05,0,0};
};
AnyRefNode BicepsLong = {
sRel = {0.1,0,0};
};
AnyRefNode TricepsLong = {
sRel = {-0.1,0,0};
};
}; // Global reference frame
The first line, "AnyDrawRefFrame ..." does nothing else than cause the global reference system to be
displayed in the graphics window. If for some reason you don't want the reference frame to be visible, just
erase this line or make it a comment by prefixing it with "//". It is often nice to have a visualization of the
global reference frame, but the current version may be a bit on the large side for the model. Let us reduce
the size a little bit and change the color to better distinguish it from the yellow segments:
AnyDrawRefFrame DrwGlobalRef = {
ScaleXYZ = {0.1, 0.1, 0.1};
RGB = {0,1,0};
};
The remaining lines are definitions of points in the global reference frame.
Now that we have the necessary points available, we can go ahead and fix the upper arm to the global
reference frame by means of a "shoulder" joint. A real shoulder is a very complex mechanism with several
joints in it, but for this 2-D model, we shall just define a simple hinge. We create a new folder to contain the
joints and define the shoulder:
}; // LowerArm
}; // Segs folder
AnyFolder Jnts = {
//---------------------------------
AnyRevoluteJoint Shoulder = {
Axis = z;
AnyRefNode &GroundNode = ..GlobalRef.Shoulder;
AnyRefNode &UpperArmNode = ..Segs.UpperArm.ShoulderNode;
}; // Shoulder joint
}; // Jnts folder
A hinge is technically called a revolute joint, and this is what the type definition "AnyRevoluteJoint" means.
After that, the definition is just a matter of setting the properties of the joint that make it behave the way
we want. Let's have a closer look at each property:
Axis = z;
The AnyBody system is inherently three-dimensional. This applies also when we are creating a model that
will only operate in two dimensions, and it means that a revolute joint must know which axis to rotate
about. The property Axis = z simply specifies that the segment will rotate about the z axis of the node at the
joint. Does that sound complicated?
Well, a segment is really a reference frame. The nodes on segments are also reference frames, and each
reference frame can have its orientation defined by the user. A joint of this type forces the two z axes of the
two joined nodes to be parallel. You can control the mutual orientation of the two joined segments by
rotating the reference frames of the nodes you are connecting. This is relevant if you want one of the joints
to rotate about some skew axis.