Coordinate Components of AnyDrawVector

I am currently using the AnyDrawVector option to visualize the magnitude of the
gh joint force throughout a movement with the following lines:

AnyDrawVector RGHJntForce = {
AnyRefFrame &ref = Main.MyArm.HumanModel.Right.ShoulderArm.Seg.Humerus.gh;
Vec =
Main.DrawSettings.DrawSettingsJointReactions.Lin.ScaleFactor*Main.MyArm.HumanMod
el.Right.ShoulderArm.Jnt.GHLinCon.Reaction.Fout;
DrawCoord = On;
Line.RGB = Main.DrawSettings.DrawSettingsJointReactions.Lin.RGB;
Line.Thickness = Main.DrawSettings.DrawSettingsJointReactions.Lin.Thickness;
};

Instead of visualizing the magnitude of the joint force I want to visualize the
x-, y-, and z- components of the force in the gh coordinate system. So, for
example, I want the y- component of the force to be represented by an arrow
pointing down (or up) the shaft of the humerus to the gh node. How can I go
about getting the joint forces visually represented in the x-, y-, and z-
coordinate system of the gh joint? I have tried unsuccessfully being creative
with lines like:

AnyDrawRefFrame RGHJointForceTest =
{
RGB = {0, 0, 0};
ScaleXYZ = {
Main.MyArm.HumanModel.Right.ShoulderArm.Jnt.GHLinCon.Reaction.Fout[0],
Main.MyArm.HumanModel.Right.ShoulderArm.Jnt.GHLinCon.Reaction.Fout[1],
Main.MyArm.HumanModel.Right.ShoulderArm.Jnt.GHLinCon.Reaction.Fout[2]
};
};

I am assuming that there has to be some kind of coordinate transformation to
accomplish this because currently, when the DrawCoord = On, the coordinates of
the joint forces aren?t aligned with the coordinates of the humerus segment or
gh node. I will be uploading a snapshot of this, where the red arrows are
pointing to the DrawCoord outputs from the AnyDrawVector, and the white arrows
are pointing to the segment axes of the humerus.

Thank you for your time,
Sarah

Hi Sarah

It is possible to draw the components seperately but you need to
make three AnyDrawVectors to do this.

Something like this for the x component should work

AnyDrawVector RGHJntForceX = {
AnyRefFrame &ref =
Main.MyArm.HumanModel.Right.ShoulderArm.Seg.Humerus.gh;
GlobalCoord=Off;
Vec =
Main.DrawSettings.DrawSettingsJointReactions.Lin.ScaleFactor*
{Main.MyArm.HumanModel.Right.ShoulderArm.Jnt.GHLinCon.Reaction.Fout
[0],0,0};
DrawCoord = On;
Line.RGB = Main.DrawSettings.DrawSettingsJointReactions.Lin.RGB;
Line.Thickness =
Main.DrawSettings.DrawSettingsJointReactions.Lin.Thickness;
};

Please notice that the setting GlobalCoord=Off; by default this is
On meaning that the vector will be displayed in the global
coordinate system. By setting it to off it will display the force in
the coordinate system of the humerus.gh node.

Best regards
Søren, AnyBody Support

— In anyscript@yahoogroups.com, “Sarah R. Sullivan” <sarsulli@…>
wrote:
>
> I am currently using the AnyDrawVector option to visualize the
magnitude of the gh joint force throughout a movement with the
following lines:
>
> AnyDrawVector RGHJntForce = {
> AnyRefFrame &ref =
Main.MyArm.HumanModel.Right.ShoulderArm.Seg.Humerus.gh;
> Vec =
Main.DrawSettings.DrawSettingsJointReactions.Lin.ScaleFactor*Main.MyA
rm.HumanModel.Right.ShoulderArm.Jnt.GHLinCon.Reaction.Fout;
> DrawCoord = On;
> Line.RGB = Main.DrawSettings.DrawSettingsJointReactions.Lin.RGB;
> Line.Thickness =
Main.DrawSettings.DrawSettingsJointReactions.Lin.Thickness;
> };
>
> Instead of visualizing the magnitude of the joint force I want to
visualize the x-, y-, and z- components of the force in the gh
coordinate system. So, for example, I want the y- component of the
force to be represented by an arrow pointing down (or up) the shaft
of the humerus to the gh node. How can I go about getting the joint
forces visually represented in the x-, y-, and z- coordinate system
of the gh joint? I have tried unsuccessfully being creative with
lines like:
>
> AnyDrawRefFrame RGHJointForceTest =
> {
> RGB = {0, 0, 0};
> ScaleXYZ = {
>
Main.MyArm.HumanModel.Right.ShoulderArm.Jnt.GHLinCon.Reaction.Fout
[0],
>
Main.MyArm.HumanModel.Right.ShoulderArm.Jnt.GHLinCon.Reaction.Fout
[1],
>
Main.MyArm.HumanModel.Right.ShoulderArm.Jnt.GHLinCon.Reaction.Fout[2]
> };
> };
>
> I am assuming that there has to be some kind of coordinate
transformation to accomplish this because currently, when the
DrawCoord = On, the coordinates of the joint forces aren?t aligned
with the coordinates of the humerus segment or gh node. I will be
uploading a snapshot of this, where the red arrows are pointing to
the DrawCoord outputs from the AnyDrawVector, and the white arrows
are pointing to the segment axes of the humerus.
>
> Thank you for your time,
> Sarah
>