Scaling

I am a colaborator of professor J.J.Marín at University of Zaragoza
(Spain).
We want use Scaling.any in our model with an include but we have a lot
of problems.
Scaling.any is in StandingModel(folder) but it not used in
StandingModelMain.any. Where is the reference about Scaling.any in Main
(file)?
Best regards.

Hi

I will try to explain how the scaling works:

If you look in the ARep/Aalborg/StandingModel.Main.any the
HumanModel
folder will look the following way (i have removed some of the lines)

AnyFolder HumanModel={

   //This model uses the simple constant force muscles

#include "…\BRep\Aalborg\BodyModels\FullBodyModel\BodyModel.a
ny
"

   AnyFolder StrengthParameters={
     AnyVar SpecificMuscleTensionSpine= 90; //N/cm^2
     AnyVar StrengthIndexLeg= 1;
     AnyVar SpecificMuscleTensionShoulderArm= 90; //N/cm^2
   };

   //Pick one of the scaling laws
   //Do not scale
   #include "..\..\..\BRep\Aalborg\Scaling\ScalingStandard.any"
   //Scaling unifromly in all directions to macth segments lengths
   //#include "..\..\..\BRep\Aalborg\Scaling\ScalingUniform.any"
   //Scaling taking length and mass of the segments into account
   //#include "..\..\..\BRep\Aalborg\Scaling\ScalingLengthMass.any

"
//Scaling taking length, mass and fat of the segments into
/*#include “…\BRep\Aalborg\Scaling\ScalingLengthMassFat.
an
y”

   Scaling={

#include “…\BRep\Aalborg\Scaling\AnyFamily\AnyAnne.any”
};*/
};

This means that the human model will be equipped with muscles with
constant strength and the model will not be scaled because the
scaling law “ScalingStandard.any” is being used.

If you want to scale the person you can choose between the three
scaling laws listed. I would recommend to use
the “ScalingLengthMassFat.any” it will provide the most realistic
scaling. So please outcomment the ScalingStandard.any line and use
the line ScalingLengthMassFat.any instead.

The next thing is to make a link to a file containing the
anthropometric measures of the person.

So initially try to use the lines

Scaling={

#include “…\BRep\Aalborg\Scaling\AnyFamily\AnyAnne.any”
};

If you look in the folder “BRep\Aalborg\Scaling\AnyFamily” you can
find a collection of already defined subjects which can be used.
If you would like to add another subject please use one of the files
as your guideline for the needed parameters.

You can read more about the scaling at the following link

http://www.anybodytech.com/fileadmin/examples/ScalingWebcast.pdf

it is a webcast presentation of the scaling. You will be asked to
log in when you click the link, please use your normal
AnyBodyTech.com user login, if you are not already a user you need
to register

I hope this helps you move on otherwise please do not hesitate to
write again.

Best regards
Søren, AnyBody Support

— In anyscript@yahoogroups.com, “raulborrazlamiel”
<raulborrazlamiel@…> wrote:
>
> I am a colaborator of professor J.J.Marín at University of
Zaragoza
> (Spain).
> We want use Scaling.any in our model with an include but we have a
lot
> of problems.
> Scaling.any is in StandingModel(folder) but it not used in
> StandingModelMain.any. Where is the reference about Scaling.any in
Main
> (file)?
> Best regards.
>

Hi Soren,

The last week you said me that I use “ScalingLengthMassFat” in
Mannequin file because it is the most complety scaling option.

When I run the kinematic analysis:

Kinematic Analysis (Operation: Main.Study.KinematicAnalysis):
0) Design variables have been updated.

  1. Load time positions have been re-established.
  2. Kinematic analysis completed. The kinematic constraints have been
    resolved.
  3. Initial conditions are fully updated
  4. Kinematic analysis…
    ERROR(OBJ1) :
    D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any
    (570) : ‘pectoralis_major_thoracic_part_5.SPLine’ : Number of
    allowed iterations for contact solution has been exceeded in
    Main.Model.HumanModel.Right.ShoulderArm.Mus.pectoralis_major_thoracic
    _part_5.SPLine

This error is producing with “ScalingLengthMassFat”
and “ScalingLengthMass” options. I am using the BodyModel in
FreePostureModel. Do you think that I should use “ScalingUniform”
or “ScalingStandard”?

Thank you for your last message (muscle names), the problem was
resolved.

Best regards.

Hi Raul

The error you get is due to a wrapping muscle, which fails to
converge.

The remedy is normally to increase the number of points used for the
muscle wrapping.

If you double click on the error message you will jump to the
definition of muscle causing the problem. Please try to increase the
variable SPLine.StringMesh by for example 10. This will increase the
number of points on the line and help the wrapping algorithm
converge hopefully.

The different scaling laws will change the dimension of the segments
slightly and thus have an influence on the muscle wrapping. This is
why you will not get this error with some of the scaling laws.

Best regards
Søren, AnyBody Support

— In anyscript@yahoogroups.com, “raulborrazlamiel”
<raulborrazlamiel@…> wrote:
>
> Hi Soren,
>
> The last week you said me that I use “ScalingLengthMassFat” in
> Mannequin file because it is the most complety scaling option.
>
> When I run the kinematic analysis:
>
> Kinematic Analysis (Operation: Main.Study.KinematicAnalysis):
> 0) Design variables have been updated.
> 1) Load time positions have been re-established.
> 2) Kinematic analysis completed. The kinematic constraints have
been
> resolved.
> 3) Initial conditions are fully updated
> 4) Kinematic analysis…
> ERROR(OBJ1) :
> D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any
> (570) : ‘pectoralis_major_thoracic_part_5.SPLine’ : Number of
> allowed iterations for contact solution has been exceeded in
>
Main.Model.HumanModel.Right.ShoulderArm.Mus.pectoralis_major_thoracic
> _part_5.SPLine
>
> This error is producing with “ScalingLengthMassFat”
> and “ScalingLengthMass” options. I am using the BodyModel in
> FreePostureModel. Do you think that I should use “ScalingUniform”
> or “ScalingStandard”?
>
> Thank you for your last message (muscle names), the problem was
> resolved.
>
> Best regards.
>

Hi Soren,

I changed “Spline.SringMesh” from 45 to 40 and the last error was
solutioned but we have been doing tests and it continues to give
other error, it is:

ERROR :
D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any(816) :
pectoralis_major_thoracic_part_5 : Unexpected exception in the
library OOSol :
OOSol exception : General factorization exception : Negative or
zero pivot

When I will scale other people, do I have to change this parametres
everytime?

We have been seeing your slides about scaling (webcast) and you
recommended not use the file “ScalingUniform.any”. Why did you say
this? When this scaling law the erros isn’t produce in our model.

Depends of your answer we will continue with our model and we´ll use
the file “ScalingUniform.any” or otherwise we will think the other
way to scaling our model with respect the parameters of
file “Muscle.any”.

Regards.

Hi Raul

You write that you have decreased the Spline.StringMesh from 40 to
45. I recommended an increase of about 10 points or maybee more,
please try this, if you have not already done this.

The ScalingUniform.any will scale the bones equally in all
directions, we have found that this not a realistic way of scaling
the persons, the ScalingLenghtMassFat is much more realistic.

The problem you have with this muscls is not directly related to the
scaling. If you tried other heights you might have this problem with
the scalingUniform as well. It should not be need to change this
number when you chnage the size of the person in general.

Please try to increase the stringMesh number to 60 or more? and see
if it solves the problem, if not i would like to debug your model a
bit.

Best regards
Søren, AnyBody support

— In anyscript@yahoogroups.com, Raúl Borraz Lamiel
<raulborrazlamiel@…> wrote:
>
> Hi Soren,
>
> I changed “Spline.SringMesh” from 45 to 40 and the last error was
> solutioned but we have been doing tests and it continues to give
> other error, it is:
>
> ERROR :
> D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any
(816) :
> pectoralis_major_thoracic_part_5 : Unexpected exception in the
> library OOSol :
> OOSol exception : General factorization exception : Negative or
> zero pivot
>
> When I will scale other people, do I have to change this
parametres
> everytime?
>
> We have been seeing your slides about scaling (webcast) and you
> recommended not use the file “ScalingUniform.any”. Why did you say
> this? When this scaling law the erros isn’t produce in our model.
>
> Depends of your answer we will continue with our model and we´ll
use
> the file “ScalingUniform.any” or otherwise we will think the other
> way to scaling our model with respect the parameters of
> file “Muscle.any”.
>
> Regards.
>

Hi Soren,

I change the parameter “Spline.StringMesh” but the errors not stop.
I say the procedure and the changes that I did it.

“4) Kinematic analysis…
ERROR(OBJ1) :
D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any
(816) : ‘pectoralis_major_thoracic_part_5.SPLine’ : Number of
allowed iterations for contact solution has been exceeded in
Main.Model.HumanModel.Right.ShoulderArm.Mus.pectoralis_major_thoracic
_part_5.SPLine”

I changed Spline.StringMesh from 45 to 65 and it appears the same
error but in other muscle:

“4) Kinematic analysis…
ERROR :
D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any
(1979) : Triceps_ME_1 : Unexpected exception in the library
OOSol :
OOSol exception : Maximal number of iteration was exceeded :”

I changed Spline.StringMesh from 50 to 110 and it appears other
error:

“4) Inverse dynamic analysis…
ERROR :
D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any(793) :
pectoralis_major_thoracic_part_4 : Unexpected exception in the
library OOSol :
OOSol exception : General factorization exception : Negative or
zero pivot”

I send you our model to debug it. Thanks in advanced.

Hi Raul

I tried to debug your model, but there was only the main file, i
also need the AnyRaul.any file and the other files in that dir.
Please zip the entire directory of your application (the
FreePostureMove directory), and upload it.

Since you get the wrapping error in multiple muscles now, i am
worried about if you have an error in the AnyRaul.any scaling file.
Did you try to load the model without the muscles on, by seleceting
the line

#include “…\BRep\Aalborg\BodyModels\FullBodyModel\BodyModel_N
oMuscles.any”

in your main file?, this will allow you to see the model without the
muscles on.

Best regards
Søren, AnyBody Support

— In anyscript@yahoogroups.com, Raúl Borraz Lamiel
<raulborrazlamiel@…> wrote:
>
> Hi Soren,
>
> I change the parameter “Spline.StringMesh” but the errors not
stop.
> I say the procedure and the changes that I did it.
>
> “4) Kinematic analysis…
> ERROR(OBJ1) :
> D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any
> (816) : ‘pectoralis_major_thoracic_part_5.SPLine’ : Number of
> allowed iterations for contact solution has been exceeded in
>
Main.Model.HumanModel.Right.ShoulderArm.Mus.pectoralis_major_thoracic
> _part_5.SPLine”
>
> I changed Spline.StringMesh from 45 to 65 and it appears the same
> error but in other muscle:
>
> “4) Kinematic analysis…
> ERROR :
> D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any
> (1979) : Triceps_ME_1 : Unexpected exception in the library
> OOSol :
> OOSol exception : Maximal number of iteration was exceeded :”
>
> I changed Spline.StringMesh from 50 to 110 and it appears other
> error:
>
> “4) Inverse dynamic analysis…
> ERROR :
> D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any
(793) :
> pectoralis_major_thoracic_part_4 : Unexpected exception in the
> library OOSol :
> OOSol exception : General factorization exception : Negative or
> zero pivot”
>
> I send you our model to debug it. Thanks in advanced.
>

Hi Raul

I have now tested your model, the problem is the number of timesteps.

You have a very large motion using only 5 timesteps, this can cause
diffilculties for the wrapping muscles. These muscles uses their
position in the previous timestep as the starting guess for the new
position. I have tested the model using 15 steps, and in this case
the kinematic analysis runs. The inverse analysis failed with a
recruitment problem when the legs where almost horizontal. We have
never tested the model is such an extreme posture, it could be a
moment arm which disapear in this position and cause the problem.

Best regards
Søren, AnyBody Support

— In anyscript@yahoogroups.com, Raúl Borraz Lamiel
<raulborrazlamiel@…> wrote:
>
> Hi Soren,
>
> I change the parameter “Spline.StringMesh” but the errors not
stop.
> I say the procedure and the changes that I did it.
>
> “4) Kinematic analysis…
> ERROR(OBJ1) :
> D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any
> (816) : ‘pectoralis_major_thoracic_part_5.SPLine’ : Number of
> allowed iterations for contact solution has been exceeded in
>
Main.Model.HumanModel.Right.ShoulderArm.Mus.pectoralis_major_thoracic
> _part_5.SPLine”
>
> I changed Spline.StringMesh from 45 to 65 and it appears the same
> error but in other muscle:
>
> “4) Kinematic analysis…
> ERROR :
> D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any
> (1979) : Triceps_ME_1 : Unexpected exception in the library
> OOSol :
> OOSol exception : Maximal number of iteration was exceeded :”
>
> I changed Spline.StringMesh from 50 to 110 and it appears other
> error:
>
> “4) Inverse dynamic analysis…
> ERROR :
> D:__AnyBody\Repository.6_NEW\BRep\Aalborg\Arm3D\Muscle.any
(793) :
> pectoralis_major_thoracic_part_4 : Unexpected exception in the
> library OOSol :
> OOSol exception : General factorization exception : Negative or
> zero pivot”
>
> I send you our model to debug it. Thanks in advanced.
>

Hello folks,

could someone please give me a clue about function calls? I would like
to understand “AnyFunTransform3D” and “Scale” in the following context
(StandingModel, V.7):

 AnyDrawSurf DrwSurf = {
   FileName = ".\BonesSpine\L5Seg";
   RGB = ...ColorRef.Segments;
   Transparency = 1;
   AnyFunTransform3D &Scale =.Scale;
 };

The documentation says that AnyFunTransform3D converts vectors
according to a given function (which is called Scale?)

I have 4 questions:
1.) Why is the function called “Scale” but is referenced to
“ScaleFunction”? Why is there a difference in naming and why don’t i
find .Scale in the files?

2.) When i dump Scale i get this:
Main.HumanModel.Scaling.GeometricalScaling.Lumbar.ScaleFunction =
{
Function =
{
ArgList =
{
Arg = {0, 0, 0};
};
Return = {-0.02, 0.1, -0.05};
};
};
i.e. the Arg is different from Return, although
“AnyFunTransform3DIdentity Scalefunction {};” should return the
exactly input argument. Why this?

3.) In which file is the return vector defined?

4.) Where in the documentation can i find an explanation to the
following syntax: .Scale({0.158,0.008,0.015})

Thanks,

Thomas

Hi Thomas

Good questions!

Q1: The .Scale is a reference to the scaling function for this segment this
scale function is not defined inside the segment file itself, but
constructed outside the segment. The reason for this is that is what makes
it possible to apply different scaling laws to the same segment files. In
the Main file you can choose between the various scaling methods and each of
them will create a different scaling function for all the segments in the
model. This makes it possible for the users to change and invent new scaling
laws without making changes to the segment files. So you can find the
definition of the scaling law in a file like
/Body/AAU/Scaling/ScalingLenghtMassFat.any or similar. The .Scale in the
L1Seg makes references to the L1Seg scale folder in this file.

Q2: I think the reason for this is that the item you have clicked is not a
specific call to the function, it is the function itself, it this case it
seems that the return value is rather arbitrary. I do not think this is an
error but it is rather a undefined case, but it would be nice it gave a
meaningful value. When you make use of this scalefunction in the segment it
will return the input vector.

Q3: The definition can be found in the file
/Body/AAUHuman/Scaling/ScalingStandard.any you can also see
/Body/AAUHuman/Scaling/ScalingLengthMassFat.any here there is a scaling
matrix defined.

Q4: it depends on which function .Scale refers to: if it is a
AnyFunTransform3DLin

Then you can find more info about in the reference manual. In this case it
is a Linear 3D transformation function.

This is the description from the manual:

The linear scaling is defined by a 3 by 3 scaling matrix that is multiplied
to the argument (3D geometrical vector) after subtracting a set of offset
values. The scaling matrix and the offset vector are given as members of the
class.

If it is a AnyFunTransform3Didentity .Scale refers to the manual has the
following explanation:

This transformation function returns a vector that is equal to the input
argument. This is useful for replacement of other transformation function in
cases where transformation is not wanted for

a particular application but transformation facilites is implemented
generally in the AnyScript model.

We are actually working on a tutorial for the scaling this will hopefully
also make these things clearer :wink:

Please do not hesitate to write again if you have further questions.

Best regards

Søren, AnyBody Support


From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of zandfub1
Sent: 21 August 2008 16:03
To: anyscript@yahoogroups.com
Subject: [AnyScript] scaling

Hello folks,

could someone please give me a clue about function calls? I would like
to understand “AnyFunTransform3D” and “Scale” in the following context
(StandingModel, V.7):

AnyDrawSurf DrwSurf = {
FileName = “.\BonesSpine\L5Seg”;
RGB = …ColorRef.Segments;
Transparency = 1;
AnyFunTransform3D &Scale =.Scale;
};

The documentation says that AnyFunTransform3D converts vectors
according to a given function (which is called Scale?)

I have 4 questions:
1.) Why is the function called “Scale” but is referenced to
“ScaleFunction”? Why is there a difference in naming and why don’t i
find .Scale in the files?

2.) When i dump Scale i get this:
Main.HumanModel.Scaling.GeometricalScaling.Lumbar.ScaleFunction =
{
Function =
{
ArgList =
{
Arg = {0, 0, 0};
};
Return = {-0.02, 0.1, -0.05};
};
};
i.e. the Arg is different from Return, although
“AnyFunTransform3DIdentity Scalefunction {};” should return the
exactly input argument. Why this?

3.) In which file is the return vector defined?

4.) Where in the documentation can i find an explanation to the
following syntax: .Scale({0.158,0.008,0.015})

Thanks,

Thomas

[Non-text portions of this message have been removed]

Hi Søren,

thanks for your hints, but i have still some questions:

To 1)
It is a good idea to “outsource” scaling, but what i don’t understand is, that
there is no file in which a function “Scale” is defined. I found many
references (&Scale) and functions like “ScaleFunction” and variables like
ScaleXYZ or a folder named “Scaling” but no line like “Scale = …”

To 2) I thought when i load a model, mark a variable, click it right and
select “Dump” i get the contents of the variable?
In my case i marked “Scale”, selected “Locate in Model Tree”,
selected “Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.L5Seg.DrwSTL.Scale”
and in the model tree i selected “Dump”. What is the value of the variable
Scale in this context (StandingModel v. 7), {0, 0, 0} (which is the
argument), {-0.02, 0.1, -0.05} (which is the return value), or {1, 1, 1}
(which seems to be the most logical)?

To 4) Where from do i know to which function .Scale({0.158,0.008,0.015})
refers to?

The planned tutorial on scaling is a good idea :slight_smile:

Thanks,

Thomas

> AnyScript Support wrote:
> Hi Thomas
>
>
>
> Good questions!
>
>
>
> Q1: The .Scale is a reference to the scaling function for this segment this
> scale function is not defined inside the segment file itself, but
> constructed outside the segment. The reason for this is that is what makes
> it possible to apply different scaling laws to the same segment files. In
> the Main file you can choose between the various scaling methods and each
> of them will create a different scaling function for all the segments in
> the model. This makes it possible for the users to change and invent new
> scaling laws without making changes to the segment files. So you can find
> the definition of the scaling law in a file like
> /Body/AAU/Scaling/ScalingLenghtMassFat.any or similar. The .Scale in the
> L1Seg makes references to the L1Seg scale folder in this file.
>
>
>
> Q2: I think the reason for this is that the item you have clicked is not a
> specific call to the function, it is the function itself, it this case it
> seems that the return value is rather arbitrary. I do not think this is an
> error but it is rather a undefined case, but it would be nice it gave a
> meaningful value. When you make use of this scalefunction in the segment it
> will return the input vector.
>
>
>
> Q3: The definition can be found in the file
> /Body/AAUHuman/Scaling/ScalingStandard.any you can also see
> /Body/AAUHuman/Scaling/ScalingLengthMassFat.any here there is a scaling
> matrix defined.
>
>
>
> Q4: it depends on which function .Scale refers to: if it is a
> AnyFunTransform3DLin
>
> Then you can find more info about in the reference manual. In this case it
> is a Linear 3D transformation function.
>
> This is the description from the manual:
>
> The linear scaling is defined by a 3 by 3 scaling matrix that is multiplied
> to the argument (3D geometrical vector) after subtracting a set of offset
> values. The scaling matrix and the offset vector are given as members of
> the class.
>
>
>
> If it is a AnyFunTransform3Didentity .Scale refers to the manual has the
> following explanation:
>
> This transformation function returns a vector that is equal to the input
> argument. This is useful for replacement of other transformation function
> in cases where transformation is not wanted for
>
> a particular application but transformation facilites is implemented
> generally in the AnyScript model.
>
>
>
> We are actually working on a tutorial for the scaling this will hopefully
> also make these things clearer :wink:
>
>
>
> Please do not hesitate to write again if you have further questions.
>
>
>
> Best regards
>
> Søren, AnyBody Support
>
>
>
>
>
>
>
>
>
> _____
>
> From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On
> Behalf Of zandfub1
> Sent: 21 August 2008 16:03
> To: anyscript@yahoogroups.com
> Subject: [AnyScript] scaling
>
>
>
> Hello folks,
>
> could someone please give me a clue about function calls? I would like
> to understand “AnyFunTransform3D” and “Scale” in the following context
> (StandingModel, V.7):
>
> AnyDrawSurf DrwSurf = {
> FileName = “.\BonesSpine\L5Seg”;
> RGB = …ColorRef.Segments;
> Transparency = 1;
> AnyFunTransform3D &Scale =.Scale;
> };
>
> The documentation says that AnyFunTransform3D converts vectors
> according to a given function (which is called Scale?)
>
> I have 4 questions:
> 1.) Why is the function called “Scale” but is referenced to
> “ScaleFunction”? Why is there a difference in naming and why don’t i
> find .Scale in the files?
>
> 2.) When i dump Scale i get this:
> Main.HumanModel.Scaling.GeometricalScaling.Lumbar.ScaleFunction =
> {
> Function =
> {
> ArgList =
> {
> Arg = {0, 0, 0};
> };
> Return = {-0.02, 0.1, -0.05};
> };
> };
> i.e. the Arg is different from Return, although
> “AnyFunTransform3DIdentity Scalefunction {};” should return the
> exactly input argument. Why this?
>
> 3.) In which file is the return vector defined?
>
> 4.) Where in the documentation can i find an explanation to the
> following syntax: .Scale({0.158,0.008,0.015})

Hi Thomas

Q1: If you look in the top of the seg.any file in the leg model you can find
a line like this…

AnyFunTransform3D &Scale =…Scaling.GeometricalScaling.Foot.ScaleFunction;

So inside the foot segment we start by making a reference to the scale
function for the foot, this is why it is possible just to write .Scale
inside these segments.

If you look in the ScalingUniform.any file or similar you will find a line
like

AnyFolder GeometricalScaling = {

 AnyFolder Foot  = {

   AnyVar    GeomScale = (..AnthroSegmentLengths.FootLength /

…StandardParameters.Foot.Length);

   AnyFunTransform3DLin ScaleFunction = {

     ScaleMat ={{.GeomScale,0,0},{0,.GeomScale,0},{0,0,.GeomScale}};

     Offset = {0,0,0};

   };

 };

This is the scaling function that this reference is referring to.

Q2: Talked with one of the developers on this one, the number you will get
by clicking on this item is actually the last time this function was used
and you do not really know which one that it is. We might consider hiding
this info in a future release, because it is confusing.

Instead you can try to create a new variable in one of the segment files

AnyVec3 test =.Scale({1,1,1});

And check the value of test variable once the model has loaded, then it
should be scaled depending on which scale function you are using.

Q3: This can be seen by following the reference .Scale all the way to its
source please see Q1 for an example

Best regards

Søren, AnyBody Support


From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of Thomas Zander
Sent: 25 August 2008 08:27
To: anyscript@yahoogroups.com
Subject: Re: [AnyScript] scaling

Hi Søren,

thanks for your hints, but i have still some questions:

To 1)
It is a good idea to “outsource” scaling, but what i don’t understand is,
that
there is no file in which a function “Scale” is defined. I found many
references (&Scale) and functions like “ScaleFunction” and variables like
ScaleXYZ or a folder named “Scaling” but no line like “Scale = …”

To 2) I thought when i load a model, mark a variable, click it right and
select “Dump” i get the contents of the variable?
In my case i marked “Scale”, selected “Locate in Model Tree”,
selected “Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.L5Seg.DrwSTL.Scale”

and in the model tree i selected “Dump”. What is the value of the variable
Scale in this context (StandingModel v. 7), {0, 0, 0} (which is the
argument), {-0.02, 0.1, -0.05} (which is the return value), or {1, 1, 1}
(which seems to be the most logical)?

To 4) Where from do i know to which function .Scale({0.158,0.008,0.015})
refers to?

The planned tutorial on scaling is a good idea :slight_smile:

Thanks,

Thomas

> AnyScript Support wrote:
> Hi Thomas
>
>
>
> Good questions!
>
>
>
> Q1: The .Scale is a reference to the scaling function for this segment
this
> scale function is not defined inside the segment file itself, but
> constructed outside the segment. The reason for this is that is what makes
> it possible to apply different scaling laws to the same segment files. In
> the Main file you can choose between the various scaling methods and each
> of them will create a different scaling function for all the segments in
> the model. This makes it possible for the users to change and invent new
> scaling laws without making changes to the segment files. So you can find
> the definition of the scaling law in a file like
> /Body/AAU/Scaling/ScalingLenghtMassFat.any or similar. The .Scale in the
> L1Seg makes references to the L1Seg scale folder in this file.
>
>
>
> Q2: I think the reason for this is that the item you have clicked is not a
> specific call to the function, it is the function itself, it this case it
> seems that the return value is rather arbitrary. I do not think this is an
> error but it is rather a undefined case, but it would be nice it gave a
> meaningful value. When you make use of this scalefunction in the segment
it
> will return the input vector.
>
>
>
> Q3: The definition can be found in the file
> /Body/AAUHuman/Scaling/ScalingStandard.any you can also see
> /Body/AAUHuman/Scaling/ScalingLengthMassFat.any here there is a scaling
> matrix defined.
>
>
>
> Q4: it depends on which function .Scale refers to: if it is a
> AnyFunTransform3DLin
>
> Then you can find more info about in the reference manual. In this case it
> is a Linear 3D transformation function.
>
> This is the description from the manual:
>
> The linear scaling is defined by a 3 by 3 scaling matrix that is
multiplied
> to the argument (3D geometrical vector) after subtracting a set of offset
> values. The scaling matrix and the offset vector are given as members of
> the class.
>
>
>
> If it is a AnyFunTransform3Didentity .Scale refers to the manual has the
> following explanation:
>
> This transformation function returns a vector that is equal to the input
> argument. This is useful for replacement of other transformation function
> in cases where transformation is not wanted for
>
> a particular application but transformation facilites is implemented
> generally in the AnyScript model.
>
>
>
> We are actually working on a tutorial for the scaling this will hopefully
> also make these things clearer :wink:
>
>
>
> Please do not hesitate to write again if you have further questions.
>
>
>
> Best regards
>
> Søren, AnyBody Support
>
>
>
>
>
>
>
>
>
> _____
>
> From: anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com
[mailto:anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com] On
> Behalf Of zandfub1
> Sent: 21 August 2008 16:03
> To: anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com
> Subject: [AnyScript] scaling
>
>
>
> Hello folks,
>
> could someone please give me a clue about function calls? I would like
> to understand “AnyFunTransform3D” and “Scale” in the following context
> (StandingModel, V.7):
>
> AnyDrawSurf DrwSurf = {
> FileName = “.\BonesSpine\L5Seg”;
> RGB = …ColorRef.Segments;
> Transparency = 1;
> AnyFunTransform3D &Scale =.Scale;
> };
>
> The documentation says that AnyFunTransform3D converts vectors
> according to a given function (which is called Scale?)
>
> I have 4 questions:
> 1.) Why is the function called “Scale” but is referenced to
> “ScaleFunction”? Why is there a difference in naming and why don’t i
> find .Scale in the files?
>
> 2.) When i dump Scale i get this:
> Main.HumanModel.Scaling.GeometricalScaling.Lumbar.ScaleFunction =
> {
> Function =
> {
> ArgList =
> {
> Arg = {0, 0, 0};
> };
> Return = {-0.02, 0.1, -0.05};
> };
> };
> i.e. the Arg is different from Return, although
> “AnyFunTransform3DIdentity Scalefunction {};” should return the
> exactly input argument. Why this?
>
> 3.) In which file is the return vector defined?
>
> 4.) Where in the documentation can i find an explanation to the
> following syntax: .Scale({0.158,0.008,0.015})

[Non-text portions of this message have been removed]

Hi,
I need to build a musculoskeletal model of the lower extremity of an
8 yr old during a gait cycle, to compute the muscle forces
occurring. Having read both previous posts and the tutorials, I
think that using the AnyBody scaling method is an excellent solution.
I have some 8yr old motion data for the lower extremity, although I
don’t mind using the motion data already in the repository.
It seems there are a number of ways I can be approach this problem,
so I just have a couple of questions which will help in choosing the
best solution: –

  1. Is it best to use the standing model and export the lower
    extremity and drive this using the motion data I already have
    (similar to the “Importing a Leg Model” tutorial)? Although, does
    this method take into account of the body weight from the upper
    extremities, and is a walking platform required to compute the ground
    reaction forces needed for inverse dynamics.
  2. Or, is it best to modify either the GaitVaughan or Gait
    UniMiami models using the scaling functions and use those computed
    muscle forces.
    I would be very grateful of any information you would be able to
    provide.
    Many Thanks
    Pete

Hi Pete

I would use the GaitUniMiami model as the staring point for this kind of
model.

To do this you would need at C3D file with measure forces and motion.

In principle you can analyse it without the measured ground reactions but
then you would need to model the entire upper body as well, you will also
need to create contact between the feet and the ground.

The gait models in the repository all have measured ground reaction forces
applied so this means that the pelvis is carried by the “follower hand” so
the weight of the upper body is accounted for by the measured forces.

Hope this helps you move on.

Best regards

Søren, AnyBody Support


From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of dc_pete
Sent: 12 February 2009 14:07
To: anyscript@yahoogroups.com
Subject: [AnyScript] Scaling

Hi,
I need to build a musculoskeletal model of the lower extremity of an
8 yr old during a gait cycle, to compute the muscle forces
occurring. Having read both previous posts and the tutorials, I
think that using the AnyBody scaling method is an excellent solution.
I have some 8yr old motion data for the lower extremity, although I
don’t mind using the motion data already in the repository.
It seems there are a number of ways I can be approach this problem,
so I just have a couple of questions which will help in choosing the
best solution: –

  1. Is it best to use the standing model and export the lower
    extremity and drive this using the motion data I already have
    (similar to the “Importing a Leg Model” tutorial)? Although, does
    this method take into account of the body weight from the upper
    extremities, and is a walking platform required to compute the ground
    reaction forces needed for inverse dynamics.
  2. Or, is it best to modify either the GaitVaughan or Gait
    UniMiami models using the scaling functions and use those computed
    muscle forces.
    I would be very grateful of any information you would be able to
    provide.
    Many Thanks
    Pete

[Non-text portions of this message have been removed]

Hi,
Thanks for the advice about building the new model. I will do it
using the GaitUniMiami model. Just to clarify from your previous
post:-
If I take the GaitUniMaimi model and delete the upper extremities to
model only the lower half, the body weight of the upper part of the
body will still be included. Additionally, since the repository
models have measured ground reaction forces, I will not need to model
a contact between the feet and the ground.
Also, is the C3D file already incorporated into the model or is it
something I have to construct myself?
Many Thanks
Pete

— In anyscript@yahoogroups.com, AnyScript Support
<anyscriptsup@…> wrote:
>
> Hi Pete
>
>
>
> I would use the GaitUniMiami model as the staring point for this
kind of
> model.
>
>
>
> To do this you would need at C3D file with measure forces and
motion.
>
>
>
> In principle you can analyse it without the measured ground
reactions but
> then you would need to model the entire upper body as well, you
will also
> need to create contact between the feet and the ground.
>
>
>
> The gait models in the repository all have measured ground reaction
forces
> applied so this means that the pelvis is carried by the “follower
hand” so
> the weight of the upper body is accounted for by the measured
forces.
>
>
>
> Hope this helps you move on.
>
>
>
> Best regards
>
> Søren, AnyBody Support
>
>
>
> _____
>
> From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com]
On Behalf
> Of dc_pete
> Sent: 12 February 2009 14:07
> To: anyscript@yahoogroups.com
> Subject: [AnyScript] Scaling
>
>
>
> Hi,
> I need to build a musculoskeletal model of the lower extremity of
an
> 8 yr old during a gait cycle, to compute the muscle forces
> occurring. Having read both previous posts and the tutorials, I
> think that using the AnyBody scaling method is an excellent
solution.
> I have some 8yr old motion data for the lower extremity, although I
> don’t mind using the motion data already in the repository.
> It seems there are a number of ways I can be approach this problem,
> so I just have a couple of questions which will help in choosing
the
> best solution: –
> 1. Is it best to use the standing model and export the lower
> extremity and drive this using the motion data I already have
> (similar to the “Importing a Leg Model” tutorial)? Although, does
> this method take into account of the body weight from the upper
> extremities, and is a walking platform required to compute the
ground
> reaction forces needed for inverse dynamics.
> 2. Or, is it best to modify either the GaitVaughan or Gait
> UniMiami models using the scaling functions and use those computed
> muscle forces.
> I would be very grateful of any information you would be able to
> provide.
> Many Thanks
> Pete
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

Hi Pete

The GaitUniMiami model contains the spine but has reactions forces applied
on the pelvis, the spine should be left in the model, the PsoasMajor muscle
spans from the thigh to the lower lumbar spine, this is why we have the
spine in this particular model.

The Body weight will be include because you have measured ground reaction
forces applied, these forces reflect the entire body weight.

You will not need to model the contact forces if you have measured ground
reaction forces, the contact forces is only needed if you do not have this,
but then you need the motion of the entire body, this makes it much more
complicated.

The C3d file is incorporated in the gait model, this is a motion and force
file that drives the model. C3D files is a common data format used by Motion
Capture systems to export data in, so C3D files are always recordings. So if
you want to do a new gait analysis you will need a new C3D file to drive
this motion.

Best regards

Søren, AnyBody Support


From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of dc_pete
Sent: 16 February 2009 12:46
To: anyscript@yahoogroups.com
Subject: [AnyScript] Re: Scaling

Hi,
Thanks for the advice about building the new model. I will do it
using the GaitUniMiami model. Just to clarify from your previous
post:-
If I take the GaitUniMaimi model and delete the upper extremities to
model only the lower half, the body weight of the upper part of the
body will still be included. Additionally, since the repository
models have measured ground reaction forces, I will not need to model
a contact between the feet and the ground.
Also, is the C3D file already incorporated into the model or is it
something I have to construct myself?
Many Thanks
Pete

— In anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com,
AnyScript Support
<anyscriptsup@…> wrote:
>
> Hi Pete
>
>
>
> I would use the GaitUniMiami model as the staring point for this
kind of
> model.
>
>
>
> To do this you would need at C3D file with measure forces and
motion.
>
>
>
> In principle you can analyse it without the measured ground
reactions but
> then you would need to model the entire upper body as well, you
will also
> need to create contact between the feet and the ground.
>
>
>
> The gait models in the repository all have measured ground reaction
forces
> applied so this means that the pelvis is carried by the “follower
hand” so
> the weight of the upper body is accounted for by the measured
forces.
>
>
>
> Hope this helps you move on.
>
>
>
> Best regards
>
> Søren, AnyBody Support
>
>
>
> _____
>
> From: anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com
[mailto:anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com]
On Behalf
> Of dc_pete
> Sent: 12 February 2009 14:07
> To: anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com
> Subject: [AnyScript] Scaling
>
>
>
> Hi,
> I need to build a musculoskeletal model of the lower extremity of
an
> 8 yr old during a gait cycle, to compute the muscle forces
> occurring. Having read both previous posts and the tutorials, I
> think that using the AnyBody scaling method is an excellent
solution.
> I have some 8yr old motion data for the lower extremity, although I
> don’t mind using the motion data already in the repository.
> It seems there are a number of ways I can be approach this problem,
> so I just have a couple of questions which will help in choosing
the
> best solution: –
> 1. Is it best to use the standing model and export the lower
> extremity and drive this using the motion data I already have
> (similar to the “Importing a Leg Model” tutorial)? Although, does
> this method take into account of the body weight from the upper
> extremities, and is a walking platform required to compute the
ground
> reaction forces needed for inverse dynamics.
> 2. Or, is it best to modify either the GaitVaughan or Gait
> UniMiami models using the scaling functions and use those computed
> muscle forces.
> I would be very grateful of any information you would be able to
> provide.
> Many Thanks
> Pete
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

[Non-text portions of this message have been removed]