Specifications

36
Here's an AnyScript file to start on if you have not completed the previous lesson:
demo.lesson5.any
.
We have seen that models in AnyBody can move even though they do not have any muscles. This is
because we can ask the system to perform a simple kinematic analysis that does not consider forces.
However, things don't get really interesting until we add muscles to the model.
Skeletal muscles are very complicated mechanical actuators. They produce movement by pulling on our
bones in complicated patterns determined by our central nervous system. One of the main features of
AnyBody is that the system is able to predict realistic activation patterns for the muscles based on the
movement and external load.
The behavior of real muscles depends on their operating conditions, tissue composition, oxygen supply, and
many other properties, and scientists are still debating exactly how they work and what properties are
important for their function. In AnyBody you can use several different models for the muscles' behavior, and
some of them are quite sophisticated. Introducing all the features of muscle modeling is a subject fully
worthy of its own tutorial
. Here, we shall just define one very simple muscle model and use it
indiscriminately for all the muscles of the arm we are building.
As always, we start by creating a folder for the muscles:
AnyFolder Muscles = {
}; // Muscles folder
The next step is to create a muscle model that we can use for definition of the properties of all the muscles.
AnyFolder Muscles = {
// Simple muscle model with constant strength = 300 Newton
AnyMuscleModel MusMdl = {
F0 = 300;
};
}; // Muscles folder
Now we can start adding muscles. If you want the model to move, you basically need muscles to actuate
each joint in the system. Remember that muscles cannot push, so to allow a joint to move in both directions
you have to define one muscle on each side of the joint in two dimensions. If you work in three dimensions
and you have, say, a spherical joint, then you may need much more muscles than that. In fact, it can
sometimes be difficult to figure out exactly how many muscles are required to drive a complex body model.
It is very likely that your career in body modeling will involve quite a few frustrations caused by models
refusing to compute due insufficient muscles.
Let's add just one muscle to start with. These lines will do the trick:
AnyFolder Muscles = {
// Simple muscle model with constant strength = 300 Newton
AnyMuscleModel MusMdl = {
F0 = 300;
};
//---------------------------------
AnyViaPointMuscle Brachialis = {
AnyMuscleModel &MusMdl = ..Muscles.MusMdl;
AnyRefNode &Org = ..Segs.UpperArm.Brachialis;
AnyRefNode &Ins = ..Segs.ForeArm.Brachialis;
AnyDrawMuscle DrwMus = {};
};
}; // Muscles folder