We have questions regarding how to calculate lines of actions of muscle forces and orientations of moment arms of the muscles with respect to the knee joint’s local coordinate system. The model we use is GaitLowerExtremity model. For example, we want to compute line of action of rectus femoris and the orientation of the moment arm in the knee coordinate system. We feel that we can get the attachment points of the muscle from Org and Ins of rectus femoris in Chart FX. But, we are not sure how the knee coordinate system is set up. In Seg.any, there is a KneeJoint folder. We are thinking that the knee coordinate system may be created in this folder. If so, are there any ways to convert attachment points of muscles into the knee coordinate system. Please, give us any suggessions on how to compute lines of actions in the joint’s local coordinate system.

Probably the easiest way is to achieve your final goal is to find ‘LegMoments.any’ in the Body\AAUHuman\LegTD\ folder of the repository. This file contains net moment measurements for different joints. You can modify a list of muscles included in the measurement KneeNetMomentMuscle to have only ‘rectusfemoris’.
This file can also be used to learn how it was computed.

Thank you very much for your reply. I went to KneeNetMomentMuscle folder of LegMoments.any. To include only rectus femoris, I commented out other muscles except the rectus femoris in LegMuscleNames.any. Is this approach correct?

For a next step, I would like to get x, y, z coordinates of the knee joint center and attachment points of the rectus femoris. In ChartFX, there are ref and mus 63 and 64 folders (the numbers, 63 and 64, correspond to rectus femoris in LegMuscleNames.any). I assume that the ref is the knee joint’s reference system and the origin of the ref correspond to the knee joint center. I also assume that r of the ref folder is x, y, z coordinates of the origin of the system, and that r of Org and Ins folders are x, y, z coordinates of the muscle origin and insertion points. Are these assumptions correct? Please, let me know what you think.

Hi, yes. r is a vector of coordinates, but in global coordinate system. sRel and ARel represent orientation in the local reference frame. However, for the Org the parent ref. frame will PelvisSeg and you cannot use it. Therefore, you will need to subtract vectors found in global ref frame one from another. Please also note the reference frame of the knee joint may be and is most likely rotated. Axes matrix describes the rotation in the global ref. frame.
Alternatively you may also learn about AnyKinLinear and AnyKinRotational (check ref. manual) and use these kinematic measure classes to find what you need.

Thanks for your reply. I looked at x , y, z coordinates of the origin and insertion of rectus femoris. They seems to be expressed in the global coordinate system. Are they really in the pelvis segment?

I was just wondering if there were any functions to transform those coordinates into another coordinate system. I looked at the description of AnyKinRotational but I am not sure if it allows me to do it. Please, let me know what you think.

as i said: sRel, ARel - local ref. frame, r, Axes - global ref. frame. If you have a nested configuration:

AnySeg A ={
...
AnyRefNode B = {
...
AnyRefNode C = {
...
};
};
};

C.r - global coordinates, C.sRel - coordinates in ref. frame B (possibly a rotated and shifted ref. frame). AnyKinLinear can be used to find what you need if two ref. frames do no relate directly. For example:

Please refer to our tutorial “Getting Started with AnyScript”, Lesson2 to get a feel of local and global ref. frame. Browse this small model and see what the values are.