# 4.4 Point-to-point muscles

Point-to-point muscles are a simple type of component in biomechanical models that provide muscle-activated forces acting along a line between two points. ArtiSynth provides this through Muscle, which is a subclass of AxialSpring that generates an active muscle force in response to its excitation property. The excitation property can be set and queried using the methods

setExcitation (double a);
double getExcitation();

## 4.4.1 Muscle materials

As with AxialSprings, Muscle components use an AxialMaterial to compute the applied force in response to the muscle’s length , length velocity , and excitation signal . Usually the force is the sum of a passive component plus an active component that arises in response to the excitation signal.

The default AxialMaterial for a Muscle is SimpleAxialMuscle, which is essentially an activated version of LinearAxialMaterial and which computes a simple force according to

 (4.1)

where and are stiffness and damping terms, is the excitation value, and is the maximum excitation force. , and are exposed through the properties stiffness, damping, and maxForce.

More complex muscle materials are typically used for biomechanical modeling applications, generally with nonlinear passive terms and active terms that depend on the muscle length . Some of those available in ArtiSynth include ConstantAxialMuscle, BlemkerAxialMuscle, MasoudMillardLAM, and PeckAxialMuscle.

### ConstantAxialMuscle

This is a simple muscle material that has a contractile force proportional to its activation, a constant passive tension, and linear damping, as follows:

 (4.2)

The parameters for this material include:
Property Description maxForce the maximum contractile force passiveFraction the proportion of to apply as passive tension damping damping Muscle:excitation the Muscle’s activation

### LinearAxialMuscle

This is a simple muscle material that has a linear relationship between length and tension, as well as linear damping, as follows:

 (4.3)
 (4.4)

The parameters for this material include:
Property Description maxLength the length at which maximum force is generated optLength the length at which zero active force is generate maxForce the maximum contractile force passiveFraction the proportion of to apply as passive tension damping damping Muscle:excitation the Muscle’s activation

### BlemkerAxialMuscle

This muscle material generates a force as described in [3]. It is the axial muscle equivalent to the constitutive equation along the muscle fiber direction specified in the BlemkerMuscle FEM material.

### PeckAxialMuscle

This muscle material generates a force as described in [15]. It has a typical Hill-type active force-length relationship (modeled as a cosine), but the passive force-length properties are linear. This muscle model was empirically verified for jaw muscles during wide jaw opening [15].

### MasoudMillardLAM

This muscle material generates a force as described in [12] for the rigid tendon case.

## 4.4.2 Example: Muscle attached to a rigid body

Figure 4.3: SimpleMuscle model loaded into ArtiSynth.

A simple model showing a single muscle connected to a rigid body is defined in

  artisynth.demos.tutorial.SimpleMuscle


This model is identical to RigidBodySpring described in Section 3.2.2, except that the code to create the spring is replaced with code to create a muscle with a SimpleAxialMuscle material:

// create the muscle:
muscle = new Muscle ("mus", /*restLength=*/0);
muscle.setPoints (p1, mkr);
muscle.setMaterial (
new SimpleAxialMuscle (/*stiffness=*/20, /*damping=*/10, /*maxf=*/10));

Also, so that the muscle renders differently, the rendering style for lines is set to SPINDLE using the convenience method

RenderProps.setSpindleLines (muscle, 0.02, Color.RED);

To run this example in ArtiSynth, select All demos > tutorial > SimpleMuscle from the Models menu. The model should load and initially appear as in Figure 4.3. Running the model (Section 1.5.3) will cause the box to fall and sway under gravity. To see the effect of the excitation property, select the muscle in the viewer and then choose Edit properties ... from the right-click context menu. This will open an editing panel that allows the muscle’s properties to be adjusted interactively. Adjusting the excitation property using the adjacent slider will cause the muscle force to vary.