422 lines (360 with data), 10.8 kB
AnyFolder InterpolationFunctions = {
// Aliases for convenient referencing
AnyFolder &JntPos=.Posture;
AnyFolder &Thorax = ...HumanModel.BodyModel.Trunk.SegmentsThorax.ThoraxSeg;
// ************************************
// Functions for attaching the pelvis to the global reference system
// ************************************
AnyFunInterpol PelvisGroundFunction ={
Data={
.JntPos.PelvisPosXVec,
.JntPos.PelvisPosYVec,
.JntPos.PelvisPosZVec,
pi/180*.JntPos.PelvisRotZVec,
pi/180*.JntPos.PelvisRotYVec,
pi/180*.JntPos.PelvisRotXVec
};
T=.JntPos.PelvisPosTime;
Type=Bspline;
};
// ************************************
// Functions for the spine
// ************************************
//Neck Function
AnyFunInterpol NeckFunction = {
Data = pi/180*{
.JntPos.NeckLateralBendingVec,
.JntPos.NeckAxialRotationVec,
.JntPos.NeckExtensionVec
};
T=.JntPos.NeckTime;
Type=Bspline;
};
//Thorax pelvis rotation Function
AnyFunInterpol PostureFunction = {
Data = pi/180*{
.JntPos.PelvisThoraxLateralBendingVec,
.JntPos.PelvisThoraxRotationVec,
.JntPos.PelvisThoraxExtensionVec
};
T=.JntPos.PelvisThoraxTime;
Type=Bspline;
};
// ************************************
// Functions for the right arm
// ************************************
//Sterno clavicular joint Function
AnyFunInterpol SCFunctionRight ={
Data = pi/180*{
.JntPos.Right.SternoClavicularProtractionVec,
.JntPos.Right.SternoClavicularElevationVec
};
T=.JntPos.Right.SternoClavicularTime;
Type=Bspline;
};
//Glenohumeral joint
AnyFunInterpol GHFunctionRight={
Data=pi/180*{
.JntPos.Right.GlenohumeralAbductionVec, //GH joint
.JntPos.Right.GlenohumeralFlexionVec, //GH joint
.JntPos.Right.GlenohumeralExternalRotationVec //GH joint
};
T=.JntPos.Right.GlenohumeralTime;
Type=Bspline;
};
//Elbow flexion Function
AnyFunInterpol ElbowFlexionFunctionRight={
Data=pi/180*{.JntPos.Right.ElbowFlexionVec};
T=.JntPos.Right.ElbowFlexionTime;
Type=Bspline;
};
//Elbow pronation Function
AnyFunInterpol ElbowPronationFunctionRight={
Data = pi/180*{.JntPos.Right.ElbowPronationVec };
T=.JntPos.Right.ElbowPronationTime;
Type=Bspline;
};
//Wrist Function
AnyFunInterpol WristFunctionRight ={
Data = pi/180*{
.JntPos.Right.WristFlexionVec,
.JntPos.Right.WristAbductionVec
};
T=.JntPos.Right.WristTime;
Type=Bspline;
};
// ************************************
// Functions for the left arm
// ************************************
//Sterno clavicular joint Function
AnyFunInterpol SCFunctionLeft ={
Data = pi/180*{
.JntPos.Left.SternoClavicularProtractionVec,
.JntPos.Left.SternoClavicularElevationVec
};
T=.JntPos.Left.SternoClavicularTime;
Type=Bspline;
};
//Glenohumeral joint Function
AnyFunInterpol GHFunctionLeft={
Data=pi/180*{
.JntPos.Left.GlenohumeralAbductionVec, //GH joint
.JntPos.Left.GlenohumeralFlexionVec, //GH joint
.JntPos.Left.GlenohumeralExternalRotationVec //GH joint
};
T=.JntPos.Left.GlenohumeralTime;
Type=Bspline;
};
//Elbow flexion Function
AnyFunInterpol ElbowFEFunctionLeft={
Data=pi/180*{.JntPos.Left.ElbowFlexionVec};
T=.JntPos.Left.ElbowFlexionTime;
Type=Bspline;
};
//Elbow pronation Function
AnyFunInterpol ElbowPSFunctionLeft={
Data= pi/180*{.JntPos.Left.ElbowPronationVec };
T=.JntPos.Left.ElbowPronationTime;
Type=Bspline;
};
//Wrist Function
AnyFunInterpol WristFunctionLeft = {
Data = pi/180*{
.JntPos.Left.WristFlexionVec,
.JntPos.Left.WristAbductionVec};
T=.JntPos.Left.WristTime;
Type=Bspline;
};
// ************************************
// Functions for the right leg
// ************************************
//Hip Function
AnyFunInterpol HipFunctionRight={
Data= pi/180*{
.JntPos.Right.HipFlexionVec,
.JntPos.Right.HipExternalRotationVec,
.JntPos.Right.HipAbductionVec
};
T=.JntPos.Left.HipTime;
Type=Bspline;
};
//Knee Function
AnyFunInterpol KneeFunctionRight={
Data=pi/180*{.JntPos.Right.KneeFlexionVec};
T=.JntPos.Left.KneeTime;
Type=Bspline;
};
//Ankle Function
AnyFunInterpol AnkleFunctionRight={
Data = pi/180*{.JntPos.Right.AnklePlantarFlexionVec,.JntPos.Right.SubTalarEversionVec};
T=.JntPos.Left.AnkleTime;
Type=Bspline;
};
// ************************************
// Functions for the Left leg
// ************************************
//Left hip Function
AnyFunInterpol HipFunctionLeft={
Data=pi/180*{
.JntPos.Left.HipFlexionVec,
.JntPos.Left.HipExternalRotationVec,
.JntPos.Left.HipAbductionVec
};
T=.JntPos.Left.HipTime;
Type=Bspline;
};
//Knee Function
AnyFunInterpol KneeFunctionLeft={
Data=pi/180*{.JntPos.Left.KneeFlexionVec};
T=.JntPos.Left.KneeTime;
Type=Bspline;
};
//Ankle Function
AnyFunInterpol AnkleFunctionLeft={
Data = pi/180*{.JntPos.Left.AnklePlantarFlexionVec,.JntPos.Left.SubTalarEversionVec};
T=.JntPos.Left.AnkleTime;
Type=Bspline;
};
// ************************************
// Drivers for the right fingers
// ************************************
AnyFolder Right ={
//finger1
AnyFunInterpol CMC1Flexion={
Data= {..JntPos.Right.Finger1.CMCFlexionVec}*pi/180;
T=..JntPos.Right.Finger1.FingerTime;
Type=Bspline;
};
AnyFunInterpol CMC1Abduction={
Data={..JntPos.Right.Finger1.CMCDeviationVec}*pi/180;
T=..JntPos.Right.Finger1.FingerTime;
Type=Bspline;
};
AnyFunInterpol MCP1Flexion={
Data={..JntPos.Right.Finger1.MCPFlexionVec}*pi/180;
T=..JntPos.Right.Finger1.FingerTime;
Type=Bspline;
};
AnyFunInterpol MCP1Abduction={
Data={..JntPos.Right.Finger1.MCPDeviationVec}*pi/180;
T=..JntPos.Right.Finger1.FingerTime;
Type=Bspline;
};
AnyFunInterpol DIP1={
Data={..JntPos.Right.Finger1.DIPFlexionVec}*pi/180;
T=..JntPos.Right.Finger1.FingerTime;
Type=Bspline;
};
AnyFunInterpol MCP2={
Data={..JntPos.Right.Finger2.MCPFlexionVec}*pi/180;
T=..JntPos.Right.Finger2.FingerTime;
Type=Bspline;
};
AnyFunInterpol PIP2={
Data={..JntPos.Right.Finger2.PIPFlexionVec}*pi/180;
T=..JntPos.Right.Finger2.FingerTime;
Type=Bspline;
};
AnyFunInterpol DIP2={
Data={..JntPos.Right.Finger2.DIPFlexionVec}*pi/180;
T=..JntPos.Right.Finger2.FingerTime;
Type=Bspline;
};
AnyFunInterpol MCP3={
Data={..JntPos.Right.Finger3.MCPFlexionVec}*pi/180;
T=..JntPos.Right.Finger3.FingerTime;
Type=Bspline;
};
AnyFunInterpol PIP3={
Data={..JntPos.Right.Finger3.PIPFlexionVec}*pi/180;
T=..JntPos.Right.Finger3.FingerTime;
Type=Bspline;
};
AnyFunInterpol DIP3={
Data={..JntPos.Right.Finger3.DIPFlexionVec}*pi/180;
T=..JntPos.Right.Finger3.FingerTime;
Type=Bspline;
};
AnyFunInterpol MCP4={
Data={..JntPos.Right.Finger4.MCPFlexionVec}*pi/180;
T=..JntPos.Right.Finger4.FingerTime;
Type=Bspline;
};
AnyFunInterpol PIP4={
Data={..JntPos.Right.Finger4.PIPFlexionVec}*pi/180;
T=..JntPos.Right.Finger4.FingerTime;
Type=Bspline;
};
AnyFunInterpol DIP4={
Data={..JntPos.Right.Finger4.DIPFlexionVec}*pi/180;
T=..JntPos.Right.Finger4.FingerTime;
Type=Bspline;
};
AnyFunInterpol MCP5={
Data={..JntPos.Right.Finger5.MCPFlexionVec}*pi/180;
T=..JntPos.Right.Finger5.FingerTime;
Type=Bspline;
};
AnyFunInterpol PIP5={
Data={..JntPos.Right.Finger5.PIPFlexionVec}*pi/180;
T=..JntPos.Right.Finger5.FingerTime;
Type=Bspline;
};
AnyFunInterpol DIP5={
Data={..JntPos.Right.Finger5.DIPFlexionVec}*pi/180;
T=..JntPos.Right.Finger5.FingerTime;
Type=Bspline;
};
};
// ************************************
// Drivers for the Left fingers
// ************************************
AnyFolder Left ={
//finger1
AnyFunInterpol CMC1Flexion={
Data= {..JntPos.Left.Finger1.CMCFlexionVec}*pi/180;
T=..JntPos.Left.Finger1.FingerTime;
Type=Bspline;
};
AnyFunInterpol CMC1Abduction={
Data={..JntPos.Left.Finger1.CMCDeviationVec}*pi/180;
T=..JntPos.Left.Finger1.FingerTime;
Type=Bspline;
};
AnyFunInterpol MCP1Flexion={
Data={..JntPos.Left.Finger1.MCPFlexionVec}*pi/180;
T=..JntPos.Left.Finger1.FingerTime;
Type=Bspline;
};
AnyFunInterpol MCP1Abduction={
Data={..JntPos.Left.Finger1.MCPDeviationVec}*pi/180;
T=..JntPos.Right.Finger1.FingerTime;
Type=Bspline;
};
AnyFunInterpol DIP1={
Data={..JntPos.Left.Finger1.DIPFlexionVec}*pi/180;
T=..JntPos.Left.Finger1.FingerTime;
Type=Bspline;
};
AnyFunInterpol MCP2={
Data={..JntPos.Left.Finger2.MCPFlexionVec}*pi/180;
T=..JntPos.Left.Finger2.FingerTime;
Type=Bspline;
};
AnyFunInterpol PIP2={
Data={..JntPos.Left.Finger2.PIPFlexionVec}*pi/180;
T=..JntPos.Left.Finger2.FingerTime;
Type=Bspline;
};
AnyFunInterpol DIP2={
Data={..JntPos.Left.Finger2.DIPFlexionVec}*pi/180;
T=..JntPos.Left.Finger2.FingerTime;
Type=Bspline;
};
AnyFunInterpol MCP3={
Data={..JntPos.Left.Finger3.MCPFlexionVec}*pi/180;
T=..JntPos.Left.Finger3.FingerTime;
Type=Bspline;
};
AnyFunInterpol PIP3={
Data={..JntPos.Left.Finger3.PIPFlexionVec}*pi/180;
T=..JntPos.Left.Finger3.FingerTime;
Type=Bspline;
};
AnyFunInterpol DIP3={
Data={..JntPos.Left.Finger3.DIPFlexionVec}*pi/180;
T=..JntPos.Left.Finger3.FingerTime;
Type=Bspline;
};
AnyFunInterpol MCP4={
Data={..JntPos.Left.Finger4.MCPFlexionVec}*pi/180;
T=..JntPos.Left.Finger4.FingerTime;
Type=Bspline;
};
AnyFunInterpol PIP4={
Data={..JntPos.Left.Finger4.PIPFlexionVec}*pi/180;
T=..JntPos.Left.Finger4.FingerTime;
Type=Bspline;
};
AnyFunInterpol DIP4={
Data={..JntPos.Left.Finger4.DIPFlexionVec}*pi/180;
T=..JntPos.Left.Finger4.FingerTime;
Type=Bspline;
};
AnyFunInterpol MCP5={
Data={..JntPos.Left.Finger5.MCPFlexionVec}*pi/180;
T=..JntPos.Left.Finger5.FingerTime;
Type=Bspline;
};
AnyFunInterpol PIP5={
Data={..JntPos.Left.Finger5.PIPFlexionVec}*pi/180;
T=..JntPos.Left.Finger5.FingerTime;
Type=Bspline;
};
AnyFunInterpol DIP5={
Data={..JntPos.Left.Finger5.DIPFlexionVec}*pi/180;
T=..JntPos.Left.Finger5.FingerTime;
Type=Bspline;
};
};
};//Functions