The AY function returns the rotational displacement of marker i about the y-axis of marker j, and accounts for angle wrapping.
Marker j defaults to the global coordinate system if it is not specified. The values are computed as follows: assume rotations about the other two axes (x-, z-axes) of marker j are zero. Then AY is the angle between the two x-axes (or the two z-axes). AY is measured counter-clockwise from the z-axis of the J marker to the z-axis of the I marker (see the figure below).
Measurement of AY

AY(i[,j])
| i | The marker whose rotations are being sought. |
| j | The marker with respect to which the rotations are being measured. |
Mathematically, AY is calculated as:

Cautions
For large rotations (greater than 10 degrees) about the x-axis or z-axis of marker j, the AY function becomes increasingly non-physical. Moreover, AY is undefined when both arguments to ATAN2 are zero. This occurs when the z-axis of marker i is orthogonal to the plane defined by the x and z-axis of the j marker.
Tips
If you want to change the AY function so it does not account for angle wrapping, use the MOD function. For example, use the function:
(MOD(AY(2,1)+PI,2*PI)-PI)
The MOD function achieves the cyclic effect and the +PI and -PI shift the curve accordingly.
-4*(AY(46,57)**2)
The value of the function is -4 times the square of the angle between the z axes of Markers 46 and 57. The angle is measured counterclockwise from the z-axis of Marker 57 to the z-axis of Marker 46.