[38ba34]: / Body / AAUHuman / BodyModels / GenericBodyModel / AnyMan.ClassTemplates.any

Download this file

519 lines (426 with data), 24.8 kB


#class_template Template_Anthropometrics_XYZ 
{
  
    #var AnyVar BMI = BodyMass/(BodyHeight^2);
    ///Estimation from Frankenfield et al. (2001) valid for men
    #var AnyVar FatPercent = (-0.09 + 0.0149*BMI - 0.00009*BMI^2)*100;
    
    #var AnyVar BodyMass = DesignVar(75) ;
    #var AnyVar BodyHeight = DesignVar(175 /100);
    
    AnyFolder SegmentMasses = {
    
    //Segment masses in kg from Winter ("Biomechanics and motor control of human movement." David A. Winter)
    #var AnyVar Lumbar = 0.139*.BodyMass; // T12-L1 to L5-Sacrum
    #var AnyVar Thorax = 0.1894*.BodyMass; // C7-T1 to T12-L1 (modified from 0.216 winter to separate scapula)
    #var AnyVar Pelvis = 0.142*.BodyMass;
    #var AnyVar Head = 0.081*.BodyMass; // head and cervical
    
    AnyFolder Right = 
    {
        #var AnyVar Shoulder = 0.0133*..BodyMass; //< Combined mass of shoulder muscles and scapula/clavicula bones.
        #var AnyVar UpperArm = 0.028*..BodyMass;
        #var AnyVar LowerArm = 0.016*..BodyMass;
        #var AnyVar Hand = 0.006*..BodyMass;
        #var AnyVar Thigh = 0.1*..BodyMass;
        #var AnyVar Shank = 0.0465*..BodyMass;
        #var AnyVar Talus = 0.2*0.0145*..BodyMass; //20% of total foot (from bone volume ratio)
        #var AnyVar Foot =  0.8*0.0145*..BodyMass; //80% of total foot (from bone volume ratio)
    };
    
    AnyFolder Left = 
    {
        #var AnyVar Shoulder = 0.0133*..BodyMass;
        #var AnyVar UpperArm = 0.028*..BodyMass;
        #var AnyVar LowerArm = 0.016*..BodyMass;
        #var AnyVar Hand = 0.006*..BodyMass;
        #var AnyVar Thigh = 0.1*..BodyMass;
        #var AnyVar Shank = 0.0465*..BodyMass;
        #var AnyVar Talus = 0.2*0.0145*..BodyMass; //20% of total foot (from bone volume ratio)
        #var AnyVar Foot =  0.8*0.0145*..BodyMass; //80% of total foot (from bone volume ratio)
    };   
  };

  AnyFolder SegmentDimensions = {
    #var AnyVar PelvisWidth = DesignVar(0.1705987*.SegmentScaleFactors.BodyScale); ///< distance between hip joints (0.16 for simple leg model)
    #var AnyVar PelvisHeight = DesignVar(0.108*.BodyHeight/1.75); 
    #var AnyVar PelvisDepth = DesignVar(0.1399611*.SegmentScaleFactors.BodyScale); 
    
    #var AnyVar HeadHeight = DesignVar(0.14*.BodyHeight/1.75); ///< Height in neutral position from  C1HatNode to top of head
    #var AnyVar HeadWidth = DesignVar(0.1800*.SegmentScaleFactors.BodyScale); ///< Distance from the most lateral point to most medial point on the skull
    #var AnyVar HeadDepth = DesignVar(0.2299*.SegmentScaleFactors.BodyScale); ///<  Distance from the most anterior point on the skull to the most posterior point on the skull

    #var AnyVar TrunkHeight = DesignVar(0.620233*.BodyHeight/1.75); ///< Height in neutral position from  C1HatNode to L5SacrumJnt
    #var AnyVar TrunkWidth = DesignVar(0.3881839*.SegmentScaleFactors.BodyScale); //< Width between shoulder joints
    #var AnyVar TrunkDepth = DesignVar(0.1870*.SegmentScaleFactors.BodyScale); ///< Horizontal distance between (midpoint of LTptT8S3Via3NodeL and LTptT8S3Via3NodeR) and (midpoint of RACP_CO6ViaNodeR and RACP_CO6ViaNodeL)
    
    #var AnyVar NeckLength = DesignVar(0.1390*.BodyHeight/1.75); ///< Measured as vertical distance between C7 to C1HatNode on thorax segment
    
    // These two folders are used by the scaling laws
    AnyFolder Right ={
      #var AnyVar ThighLength = DesignVar(0.4098364*..BodyHeight/1.75);
      #var AnyVar ShankLength = DesignVar(0.4210448*..BodyHeight/1.75);
      #var AnyVar FootLength = DesignVar(0.2571425*..SegmentScaleFactors.BodyScale);
      #var AnyVar FootHeight = DesignVar(0.0502*..BodyHeight/1.75);
      #var AnyVar FootWidth = DesignVar(0.0839*..SegmentScaleFactors.BodyScale);

      #var AnyVar UpperArmLength = DesignVar(0.340079*..BodyHeight/1.75);
      #var AnyVar LowerArmLength = DesignVar(0.2690167*..BodyHeight/1.75);
      #var AnyVar HandLength = DesignVar(0.182*..SegmentScaleFactors.BodyScale);
      #var AnyVar HandBreadth = DesignVar(0.085*..SegmentScaleFactors.BodyScale);  
    };
    
    AnyFolder Left ={
      #var AnyVar ThighLength = DesignVar(0.4098364*..BodyHeight/1.75);
      #var AnyVar ShankLength = DesignVar(0.4210448*..BodyHeight/1.75);
      #var AnyVar FootLength = DesignVar(0.2571425*..SegmentScaleFactors.BodyScale);
      #var AnyVar FootHeight = DesignVar(0.0502*..BodyHeight/1.75);
      #var AnyVar FootWidth = DesignVar(0.0839*..SegmentScaleFactors.BodyScale);

      #var AnyVar UpperArmLength = DesignVar(0.340079*..BodyHeight/1.75);
      #var AnyVar LowerArmLength = DesignVar(0.2690167*..BodyHeight/1.75);
      #var AnyVar HandLength = DesignVar(0.182*..SegmentScaleFactors.BodyScale);
      #var AnyVar HandBreadth = DesignVar(0.085*..SegmentScaleFactors.BodyScale);  
    };

    
  };  

  AnyFolder SegmentScaleFactors = 
  {
     /// Estimated overall scaling of the entire body. 
     /// Calculated weighing the length scale factors. 
     /// This factor is used for scaling certain body dimension
     /// if they are not given explicitly by the user.
     AnyVar BodyScale = 
       Head.LengthScale*0.07552441
       + Neck.LengthScale*0.0711439
       + Thorax.LengthScale*0.1657206
       + Lumbar.LengthScale*0.0851843
       + Pelvis.LengthScale*0.0584573
       + max({Right.Thigh.LengthScale*0.221090, Left.Thigh.LengthScale*0.221090})
       + max({Right.Shank.LengthScale*0.227137,Left.Shank.LengthScale*0.227137})
       + max({Right.Foot.DepthScale*0.037835, Left.Foot.DepthScale*0.037835});
  

    AnyFolder Pelvis = 
    {
       #var AnyFloat LengthScale = ..SegmentDimensions.PelvisHeight / ...Scaling.StandardParameters.Pelvis.Height;
       #var AnyFloat DepthScale = ..SegmentDimensions.PelvisDepth / ...Scaling.StandardParameters.Pelvis.Depth;
       #var AnyFloat WidthScale = ..SegmentDimensions.PelvisWidth / ...Scaling.StandardParameters.Pelvis.Width;
    };
    AnyFolder Thorax = 
    {
      #var AnyFloat LengthScale = ..SegmentDimensions.TrunkHeight / ...Scaling.StandardParameters.Trunk.Height;
      #var AnyFloat DepthScale = ..SegmentDimensions.TrunkDepth / ...Scaling.StandardParameters.Trunk.Depth;
      #var AnyFloat WidthScale = ..SegmentDimensions.TrunkWidth / ...Scaling.StandardParameters.Trunk.Width;
    };
    AnyFolder Head = 
    {
      #var AnyFloat LengthScale = ..SegmentDimensions.HeadHeight / ...Scaling.StandardParameters.Head.Height;
      #var AnyFloat DepthScale = ..SegmentDimensions.HeadDepth / ...Scaling.StandardParameters.Head.Depth;
      #var AnyFloat WidthScale = ..SegmentDimensions.HeadWidth / ...Scaling.StandardParameters.Head.Width;
    };
    
    AnyFolder Neck = 
    {
      #var AnyFloat LengthScale = ..SegmentDimensions.NeckLength/ ...Scaling.StandardParameters.Neck.Length;
      #var AnyFloat DepthScale = ..SegmentDimensions.TrunkDepth / ...Scaling.StandardParameters.Trunk.Depth;
      #var AnyFloat WidthScale = ..SegmentDimensions.TrunkWidth / ...Scaling.StandardParameters.Trunk.Width;
    };
    
    AnyFolder Lumbar = {
      #var AnyFloat LengthScale = ..SegmentDimensions.TrunkHeight / ...Scaling.StandardParameters.Trunk.Height;
      #var AnyFloat DepthScale = ..SegmentDimensions.TrunkDepth / ...Scaling.StandardParameters.Trunk.Depth;
      #var AnyFloat WidthScale = ..SegmentDimensions.TrunkWidth / ...Scaling.StandardParameters.Trunk.Width;
    };

    AnyFolder Right = 
    {
        AnyFolder Clavicula =  
        {
          #var AnyFloat LengthScale = ..Thorax.WidthScale;
          #var AnyFloat DepthScale = ..Thorax.DepthScale;
          #var AnyFloat WidthScale = ..Thorax.LengthScale; 
        };
        AnyFolder Scapula =  
        {
          #var AnyFloat LengthScale = ..Thorax.LengthScale; 
          #var AnyFloat DepthScale = ..Thorax.DepthScale;
          #var AnyFloat WidthScale = ..Thorax.WidthScale;
        };
        AnyFolder Humerus =
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Right.UpperArmLength / ....Scaling.StandardParameters.Humerus.Length;
          #var AnyFloat DepthScale = ..BodyScale;
          #var AnyFloat WidthScale = ..BodyScale;
        };
        AnyFolder Radius =
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Right.LowerArmLength / ....Scaling.StandardParameters.Radius.Length;
          #var AnyFloat DepthScale = ..BodyScale;
          #var AnyFloat WidthScale = ..BodyScale;
        };
        AnyFolder Ulna =
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Right.LowerArmLength / ....Scaling.StandardParameters.Ulna.Length;
          #var AnyFloat DepthScale = ..BodyScale;
          #var AnyFloat WidthScale = ..BodyScale;
        };
        AnyFolder Hand =
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Right.HandLength / ....Scaling.StandardParameters.Hand.HandLength;
          #var AnyFloat DepthScale = ...SegmentDimensions.Right.HandBreadth / ....Scaling.StandardParameters.Hand.HandBreadth;
          #var AnyFloat WidthScale = ...SegmentDimensions.Right.HandBreadth / ....Scaling.StandardParameters.Hand.HandBreadth;
        };
        AnyFolder Foot =
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Right.FootLength / ....Scaling.StandardParameters.Right.Foot.Length;
          #var AnyFloat DepthScale = ...SegmentDimensions.Right.FootHeight /  ....Scaling.StandardParameters.Right.Foot.Height;
          #var AnyFloat WidthScale = ...SegmentDimensions.Right.FootWidth /  ....Scaling.StandardParameters.Right.Foot.Width;
        };
        AnyFolder Shank =  
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Right.ShankLength / ....Scaling.StandardParameters.Right.Shank.Length;
          #var AnyFloat DepthScale = ..BodyScale;
          #var AnyFloat WidthScale = ..BodyScale;
        };
        AnyFolder Thigh =  
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Right.ThighLength / ....Scaling.StandardParameters.Right.Thigh.Length;
          #var AnyFloat DepthScale = ..BodyScale;
          #var AnyFloat WidthScale = ..BodyScale;
        };
    };
    AnyFolder Left = 
    {
        AnyFolder Clavicula =  
        {
          #var AnyFloat LengthScale = ..Thorax.WidthScale;
          #var AnyFloat DepthScale = ..Thorax.DepthScale;
          #var AnyFloat WidthScale = ..Thorax.LengthScale; 
        };
        AnyFolder Scapula =  
        {
          #var AnyFloat LengthScale = ..Thorax.LengthScale; 
          #var AnyFloat DepthScale = ..Thorax.DepthScale;
          #var AnyFloat WidthScale = ..Thorax.WidthScale;
        };
        AnyFolder Humerus =
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Left.UpperArmLength / ....Scaling.StandardParameters.Humerus.Length;
          #var AnyFloat DepthScale = ..BodyScale;
          #var AnyFloat WidthScale = ..BodyScale;
        };
        AnyFolder Radius =
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Left.LowerArmLength / ....Scaling.StandardParameters.Radius.Length;
          #var AnyFloat DepthScale = ..BodyScale;
          #var AnyFloat WidthScale = ..BodyScale;
        };
        AnyFolder Ulna =
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Left.LowerArmLength / ....Scaling.StandardParameters.Ulna.Length;
          #var AnyFloat DepthScale = ..BodyScale;
          #var AnyFloat WidthScale = ..BodyScale;
        };
        AnyFolder Hand =
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Left.HandLength / ....Scaling.StandardParameters.Hand.HandLength;
          #var AnyFloat DepthScale = ...SegmentDimensions.Left.HandBreadth / ....Scaling.StandardParameters.Hand.HandBreadth;
          #var AnyFloat WidthScale = ...SegmentDimensions.Left.HandBreadth / ....Scaling.StandardParameters.Hand.HandBreadth;
        };
        AnyFolder Foot =
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Left.FootLength / ....Scaling.StandardParameters.Left.Foot.Length;
          #var AnyFloat DepthScale = ...SegmentDimensions.Left.FootHeight / ....Scaling.StandardParameters.Left.Foot.Height;
          #var AnyFloat WidthScale = ...SegmentDimensions.Left.FootWidth / ....Scaling.StandardParameters.Left.Foot.Width;
        };
        AnyFolder Shank =  
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Left.ShankLength / ....Scaling.StandardParameters.Left.Shank.Length;
          #var AnyFloat DepthScale = ..BodyScale;
          #var AnyFloat WidthScale = ..BodyScale;
        };
        AnyFolder Thigh =  
        {
          #var AnyFloat LengthScale = ...SegmentDimensions.Left.ThighLength / ....Scaling.StandardParameters.Left.Thigh.Length;
          #var AnyFloat DepthScale = ..BodyScale;
          #var AnyFloat WidthScale = ..BodyScale;
        };
    };
  };

};









#class_template Template_Anthropometrics(T_BM_SCALING = 0,
     T_SCALING_LENGTHMASSFAT_MULTIDOFS_
     )  {
  
  
  #var AnyVar BMI = BodyMass/(BodyHeight^2);
  ///Estimation from Frankenfield et al. (2001) valid for men
  #var AnyVar FatPercent = (-0.09 + 0.0149*BMI - 0.00009*BMI^2)*100;
  
  #var AnyVar BodyMass = 75;
  #var AnyVar BodyHeight = 175 /100;
  
  
  AnyFolder SegmentMasses = {
  
  //Segment masses in kg from Winter ("Biomechanics and motor control of human movement." David A. Winter)
  #var AnyVar Lumbar = 0.139*.BodyMass; // T12-L1 to L5-Sacrum
  #var AnyVar Thorax = 0.1894*.BodyMass; // C7-T1 to T12-L1 (modified from 0.216 winter to separate scapula)
  #var AnyVar Pelvis = 0.142*.BodyMass;
  #var AnyVar Head = 0.081*.BodyMass; // head and cervical
  
  AnyFolder Right = 
  {
      #var AnyVar Shoulder = 0.0133*..BodyMass; //< Combined mass of shoulder muscles and scapula/clavicula bones.
      #var AnyVar UpperArm = 0.028*..BodyMass;
      #var AnyVar LowerArm = 0.016*..BodyMass;
      #var AnyVar Hand = 0.006*..BodyMass;
      #var AnyVar Thigh = 0.1*..BodyMass;
      #var AnyVar Shank = 0.0465*..BodyMass;
      #var AnyVar Talus = 0.2*0.0145*..BodyMass; //20% of total foot (from bone volume ratio)
      #var AnyVar Foot =  0.8*0.0145*..BodyMass; //80% of total foot (from bone volume ratio)
  };
  
  AnyFolder Left = 
  {
      #var AnyVar Shoulder = 0.0133*..BodyMass;
      #var AnyVar UpperArm = 0.028*..BodyMass;
      #var AnyVar LowerArm = 0.016*..BodyMass;
      #var AnyVar Hand = 0.006*..BodyMass;
      #var AnyVar Thigh = 0.1*..BodyMass;
      #var AnyVar Shank = 0.0465*..BodyMass;
      #var AnyVar Talus = 0.2*0.0145*..BodyMass; //20% of total foot (from bone volume ratio)
      #var AnyVar Foot =  0.8*0.0145*..BodyMass; //80% of total foot (from bone volume ratio)
  };   
};


AnyFolder SegmentDimensions = {
  #var AnyVar PelvisWidth = DesignVar(0.176*.BodyHeight/1.75); //distance between hip joints (0.16 for simple leg model)
  
  #if T_BM_SCALING == T_SCALING_LENGTHMASSFAT_MULTIDOFS_
  #var AnyVar PelvisDepth = DesignVar(0.1232*.BodyHeight/1.75); 
  #endif
  
  #var AnyVar HeadHeight = DesignVar(0.14*.BodyHeight/1.75);//height in neutral position from  C1HatNode to top of head
  #var AnyVar TrunkHeight = DesignVar(0.620233*.BodyHeight/1.75);//height in neautral position from  C1HatNode to L5SacrumJnt
  
  
  // These two folders are used by the scaling laws
  AnyFolder Right ={
    #var AnyVar ThighLength = DesignVar(0.4098364*..BodyHeight/1.75);
    #var AnyVar ShankLength = DesignVar(0.4210448*..BodyHeight/1.75);
    #var AnyVar FootLength = DesignVar(0.2571425*..BodyHeight/1.75);
    #var AnyVar TalusLength = DesignVar(0.03808687*..BodyHeight/1.75);
    
    #var AnyVar UpperArmLength = DesignVar(0.340079*..BodyHeight/1.75);
    #var AnyVar LowerArmLength = DesignVar(0.2690167*..BodyHeight/1.75);
    #var AnyVar HandLength = DesignVar(0.182*..BodyHeight/1.75);
    #var AnyVar HandBreadth = DesignVar(0.085*..BodyHeight/1.75);  
  };
  
  AnyFolder Left ={
    #var AnyVar ThighLength = DesignVar(0.4098364*..BodyHeight/1.75);
    #var AnyVar ShankLength = DesignVar(0.4210448*..BodyHeight/1.75);
    #var AnyVar FootLength = DesignVar(0.2571425*..BodyHeight/1.75);
    #var AnyVar TalusLength = DesignVar(0.03808687*..BodyHeight/1.75);
    
    #var AnyVar UpperArmLength = DesignVar(0.340079*..BodyHeight/1.75);
    #var AnyVar LowerArmLength = DesignVar(0.2690167*..BodyHeight/1.75);
    #var AnyVar HandLength = DesignVar(0.182*..BodyHeight/1.75);
    #var AnyVar HandBreadth = DesignVar(0.085*..BodyHeight/1.75);  
  };

  
};
};


#class_template Template_Anthropometrics_exterior  {

  #var AnyVar BMI = BodyMass/(BodyHeight^2);
  ///Estimation from Frankenfield et al. (2001) valid for men
  #var AnyVar FatPercent = (-0.09 + 0.0149*BMI - 0.00009*BMI^2)*100;
  
  #var AnyVar BodyMass = (75);
  #var AnyVar BodyHeight = (180 /100);
  
  
  AnyFolder SegmentMasses = {
  
  //Segment masses in kg from Winter ("Biomechanics and motor control of human movement." David A. Winter)
  #var AnyVar Lumbar = 0.139*.BodyMass; // T12-L1 to L5-Sacrum
  #var AnyVar Thorax = 0.1894*.BodyMass; // C7-T1 to T12-L1 (modified from 0.216 winter to separate scapula)
  #var AnyVar Pelvis = 0.142*.BodyMass;
  #var AnyVar Head = 0.081*.BodyMass; // head and cervical
  
  AnyFolder Right = 
  {
      #var AnyVar Shoulder = 0.0133*..BodyMass; //< Combined mass of shoulder muscles and scapula/clavicula bones.
      #var AnyVar UpperArm = 0.028*..BodyMass;
      #var AnyVar LowerArm = 0.016*..BodyMass;
      #var AnyVar Hand = 0.006*..BodyMass;
      #var AnyVar Thigh = 0.1*..BodyMass;
      #var AnyVar Shank = 0.0465*..BodyMass;
      #var AnyVar Talus = 0.2*0.0145*..BodyMass; //20% of total foot (from bone volume ratio)
      #var AnyVar Foot =  0.8*0.0145*..BodyMass; //80% of total foot (from bone volume ratio)
  };
  
  AnyFolder Left = 
  {
      #var AnyVar Shoulder = 0.0133*..BodyMass;
      #var AnyVar UpperArm = 0.028*..BodyMass;
      #var AnyVar LowerArm = 0.016*..BodyMass;
      #var AnyVar Hand = 0.006*..BodyMass;
      #var AnyVar Thigh = 0.1*..BodyMass;
      #var AnyVar Shank = 0.0465*..BodyMass;
      #var AnyVar Talus = 0.2*0.0145*..BodyMass; //20% of total foot (from bone volume ratio)
      #var AnyVar Foot =  0.8*0.0145*..BodyMass; //80% of total foot (from bone volume ratio)
  };   
};


AnyFolder SegmentDimensions = {
  #var AnyVar PelvisWidth = DesignVar(0.314); ///< between external bony tip of trochanter (horizontaly)
  #var AnyVar HeadHeight = DesignVar(0.246); ///< from chin to top of head (verticaly)
  #var AnyVar TrunkHeight = DesignVar(0.500); ///< From C7 to sacrum midle bony tip (verticaly)
  #var AnyVar UpperArmLength = DesignVar(0.414); ///< From elbow bony tip to acromion bony tip along humerus (elbow flexed 90 deg)
  #var AnyVar LowerArmLength = DesignVar(0.268); ///< From elbow bony tip to ulna styloid bony tip along ulna (elbow flexed 90 deg)
  #var AnyVar HandLength = DesignVar(0.182); ///< From the base of the palm to the tip of the middle finger.
  #var AnyVar HandBreadth = DesignVar(0.072); ///< From the external landmark of the CMP joint of the index to the external landmark of the CMP joint of the little finger
  
  
  // These two folders are used by the scaling laws
  AnyFolder Right ={
    #var AnyVar UpperArmLength = DesignVar(0.414); ///< From elbow bony tip to acromion bony tip along humerus (elbow flexed 90 deg)
    #var AnyVar LowerArmLength = DesignVar(0.268); ///< From elbow bony tip to ulna styloid bony tip along ulna (elbow flexed 90 deg)
    #var AnyVar HandLength = DesignVar(0.182); ///< From the base of the palm to the tip of the middle finger.
    #var AnyVar HandBreadth = DesignVar(0.072); ///< From the external landmark of the CMP joint of the index to the external landmark of the CMP joint of the little finger
    
    #var AnyVar FootLength = DesignVar(0.285); ///< from back of heel to tip of longest toe along foot
    #var AnyVar ThighLength = DesignVar(0.405); ///< from top of trochanter to epicondylus lateral along thigh
    #var AnyVar ShankLength = DesignVar(0.378); ///< from condulus medial to malleolus medial along shank
    #var AnyVar TalusLength = 0.133*FootLength; ///< calculated automaticaly from the foot size
  };
  
  AnyFolder Left ={
    #var AnyVar UpperArmLength = DesignVar(0.414); ///< From elbow bony tip to acromion bony tip along humerus (elbow flexed 90 deg)
    #var AnyVar LowerArmLength = DesignVar(0.268); ///< From elbow bony tip to ulna styloid bony tip along ulna (elbow flexed 90 deg)
    #var AnyVar HandLength = DesignVar(0.182); ///< From the base of the palm to the tip of the middle finger.
    #var AnyVar HandBreadth = DesignVar(0.072); ///< From the external landmark of the CMP joint of the index to the external landmark of the CMP joint of the little finger
    
    #var AnyVar ThighLength = DesignVar(0.405); ///< from top of trochanter to epicondylus lateral along thigh
    #var AnyVar ShankLength = DesignVar(0.378); ///< from condulus medial to malleolus medial along shank
    #var AnyVar FootLength = DesignVar(0.285); ///< from back of heel to tip of longest toe along foot
    #var AnyVar TalusLength = 0.133*FootLength; ///< calculated automaticaly from the foot size
  };

  
};

}; //Template_Anthropometrics




#class_template Template_Anthropometrics_50th_percentile  {
  
  AnyVar BMI = BodyMass/(BodyHeight^2);
  
  ///Estimation from Frankenfield et al. (2001) valid for men
  AnyVar FatPercent = (-0.09 + 0.0149*BMI - 0.00009*BMI^2)*100;
  
  AnyVar BodyMass = 75;
  AnyVar BodyHeight = 175 /100;
  
  
  AnyFolder SegmentMasses = {
    
    //Segment masses in kg from Winter ("Biomechanics and motor control of human movement." David A. Winter)
    AnyVar Lumbar = 0.139*.BodyMass; // T12-L1 to L5-Sacrum
    AnyVar Thorax = 0.1894*.BodyMass; // C7-T1 to T12-L1 (modified from 0.216 winter to separate scapula)
    AnyVar Pelvis = 0.142*.BodyMass;
    AnyVar Head = 0.081*.BodyMass; // head and cervical
    
    AnyFolder Right = 
    {
      AnyVar Shoulder = 0.0133*..BodyMass; //< Combined mass of shoulder muscles and scapula/clavicula bones.
      AnyVar UpperArm = 0.028*..BodyMass;
      AnyVar LowerArm = 0.016*..BodyMass;
      AnyVar Hand = 0.006*..BodyMass;
      AnyVar Thigh = 0.1*..BodyMass;
      AnyVar Shank = 0.0465*..BodyMass;
      AnyVar Talus = 0.2*0.0145*..BodyMass; //20% of total foot (from bone volume ratio)
      AnyVar Foot =  0.8*0.0145*..BodyMass; //80% of total foot (from bone volume ratio)
    };
    
    AnyFolder Left = 
    {
      AnyVar Shoulder = 0.0133*..BodyMass;
      AnyVar UpperArm = 0.028*..BodyMass;
      AnyVar LowerArm = 0.016*..BodyMass;
      AnyVar Hand = 0.006*..BodyMass;
      AnyVar Thigh = 0.1*..BodyMass;
      AnyVar Shank = 0.0465*..BodyMass;
      AnyVar Talus = 0.2*0.0145*..BodyMass; //20% of total foot (from bone volume ratio)
      AnyVar Foot =  0.8*0.0145*..BodyMass; //80% of total foot (from bone volume ratio)
    };   
  };
  
  
  AnyFolder SegmentDimensions = {
    AnyVar PelvisWidth = 0.176*.BodyHeight/1.75;     //distance between hip joints (0.16 for simple leg model)
    
    AnyVar HeadHeight = 0.14*.BodyHeight/1.75;       //height in neutral position from  C1HatNode to top of head
    AnyVar TrunkHeight = 0.620233*.BodyHeight/1.75;  //height in neautral position from  C1HatNode to L5SacrumJnt
    
    
    // These two folders are used by the scaling laws
    AnyFolder Right ={
      AnyVar ThighLength = 0.4098364*..BodyHeight/1.75;
      AnyVar ShankLength = 0.4210448*..BodyHeight/1.75;
      AnyVar FootLength = 0.2571425*..BodyHeight/1.75;
      AnyVar TalusLength = 0.03808687*..BodyHeight/1.75;
      
      AnyVar UpperArmLength = 0.340079*..BodyHeight/1.75;
      AnyVar LowerArmLength =0.2690167*..BodyHeight/1.75;
      AnyVar HandLength = 0.182*..BodyHeight/1.75;
      AnyVar HandBreadth = 0.085*..BodyHeight/1.75;  
    };
    
    AnyFolder Left ={
      AnyVar ThighLength = .Right.ThighLength;
      AnyVar ShankLength = .Right.ShankLength;
      AnyVar FootLength = .Right.FootLength;
      AnyVar TalusLength = .Right.TalusLength;
      
      AnyVar UpperArmLength = .Right.UpperArmLength;
      AnyVar LowerArmLength = .Right.LowerArmLength;
      AnyVar HandLength = .Right.HandLength;
      AnyVar HandBreadth = .Right.HandBreadth;  
    };

  };
};  // Template_Anthropometrics_50th_Percentile