The following functions are available.

=20

- =20
- Arithmetic=20
- Comparison=20
- Normalize = =20
- Distance = =20
- Point =20
- Vector =20
- Line =20
- Plane =20
- Segment =20
- Angle =20
- Velocity = =20
- Acceleration =20

**Variable timing information**

You can set the timing information for each variable. This enables the f= unction that generates your new variable to fetch the input data from input= frames that are offset from the output frame. You have the following optio= ns:

**Continuous.**The input variable will be taken at the sa= me frame number as the one being calculated for the output variable.**FirstValidFrame, LastValidFrame.**The input variable is= taken at either the first or the last valid frame of the trial. This is ha= ndy if, for example, you want the calculate the vector from the first valid= point of a marker to the last valid point, i.e. the general direction in w= hich the marker has moved throughout the trial. By creating a Vector betwee= n points A and B, where point A is trajectory X at the first valid frame, a= nd point B is trajectory X at the last valid frame, you get the direction v= ector of the trajectory's overall movement.**Previous, Following.**The input variable is taken at ei= ther the previous or the following event type specified in the combo box al= ongside. This could, for example, be useful if you want to calculate the di= stance a marker has traveled between two foot contact events.**First, Last.**The input variable is taken at either the= first or the last event type specified in the combo box alongside.

These take two input variables of any type. Note variables of different = types cannot always be combined =E2=80=93 for example, you cannot add an an= gle to a length.

**Add: A+B****Subtract: A-B****Multiply: A*B****Divide: A/B**

These functions take 2 or 4 input varia= bles, performs a comparison and returns the relevant value.

**Max: A and B.**Evaluates to the largest value of the in= put variables A and B.**Min: A and B.**Evaluates to the smallest value of the i= nput variables A and B.**If A > B then C else D. Compares A and B. If A is greater than B, then the function returns v= ariable C, otherwise it returns D.****If A =3D B then C else D. Compares A and B. If A is equal to B, then C is returned =E2=80=93 otherw= ise D.**

You can use this to calculate a percentage.

**Return A in % of B.**Returns A=E2=80=99s value as a per= centage of B.

These are functions that measure a distance.

**Magnitude: A**. Returns the magnitude (length) of the ve= ctor A.**Distance: A to B**. Returns the distance from point or s= egment A to point or segment B.

These are functions that calculate the location of a 3D point.

**{A, B, C}.**Defines a point directly from the three var= iables A, B and C, which then become the X, Y and Z component of the variab= le, respectively.**{A, B, C} in Segment D=E2=80=99s local coordinates.**De= fines a point in global coordinates from the components X=3DA, Y=3DB and Z= =3DC in segment D=E2=80=99s local coordinates.**Point A offset by vector B.**Starting at point A, this = function defines a new point that is offset by vector B.**Halfway between A and B.**Defines the halfway-point bet= ween points A and B.**Average of A, B and C.**Defines the average point of th= e three input points A, B and C.**Average of A, B, C and D.**As above, except for all 4 i= nput points.**Distance A from point B towards point C.**Starts in poi= nt B and travels the distance defined by A in the direction of Point C.**Distance A from point B along vector C.**Starts in poin= t B and travels the distance defined by A along the Vector C.**Joint center:****Distance A from pont B, C defines= normal, D defines plane.**This is the =E2=80=9Cclassic=E2=80=9D Pl= ug-in Gait method of defining a joint center (JC): a specific distance (typ= ically half the joint width from the subject measurements plus half the mar= ker diameter) away from point B (typically the joint marker), the JC point = is placed so that the lines JC-B and JC-C are perpendicular**Project: A onto B.**A is a point which is projected ont= o a line or a plane, defined by B.**Transform: A to B's local coordinates.**A is a point in= global space which is transformed to segment B's local coordinate system. = This function returns a local point.**Transform: A from B's coordinates back to global.**The = reverse of the above function, A is a local point specified in B's local co= ordinates which is transformed back to global. Note that no check is made t= o ascertain that the local point was originally defined in segment B's loca= l coordinates.**Conditional:****If A exists then A else B. This can be used if a trajectory has gaps or for some other reason doesn= =E2=80=99t exist in the trial.****Conditional:****If A exists then A else B in C=E2= =80=99s coordinates back to global.**This function is designed to m= ake it easy to recalculate the position of a marker which you have stored a= s a position in a local coordinate system during a static trial.

These are 3D vector function that either define a vector or perform calc= ulations on vectors.

**From A to B.**The vector from point A to point B.**Dot product: A * B**. The dot (scalar) product of vector= s A and B.**Cross product: A x B**. The cross product vector of inpu= t vectors A and B.**Rotate: A to B's local coordinates.**Rotates the input = vector A using segment B's rotation matrix.**Rotate: A in B's local coordinates back to global.**The= reverse of the above function - rotates the input vector A using the inver= se of segment B's rotation matrix.**Project: A onto B.**Projects the vector A onto vector B= .

These functions define a line in 3D space.

**From A to B.**Defines a line that passes through the po= ints A and B.**From A in direction B.**Defines a line that passes thro= ugh the point A and has the direction of vector B.

Defines a plane in 3D space.

**Contains A, B and C.**Defines a plane that contains the= points A, B and C.**Contains A, normal vector B.**The plane passes through = point A, and has normal vector B.

Defines a segment which has a position and orientation in 3D space. Ther= e are many ways of defining a segment. The one to choose depends on how you= want the internal axis system of the segment to be oriented.

**Origin A, X-Axis=3D****A**?**B,****Z-Axis=3D(A**?**B)x(A**?**C). Defines the segment using the three points A, B and C. The origin is at p= oint A, whereas the major axis (X in this case) is defined by the vector fr= om point A to point B. Then, the secondary axis is defined using the cross = product of the major axis and the vector from A to C. The final axis is the= n formed from the cross product of the major and secondary axes, to form a = right-handed coordinate system. This method of defining a segment is availa= ble for all axis configurations: XY, XZ, YX, YZ, ZX and ZY.****Origin A, X-Axis=3DB, Z-Axis=3DB x C.**This uses the po= int A and the vectors B and C to define the segment. B becomes the major ax= is, and the cross product of B and C becomes the secondary axis. This metho= d is also available for all axis configurations.**Define Origin A, X-Axis=3Dlab axis closest to B, Z-Axis up. This is intended to make it easy to calculate a reference system that= is aligned to the lab coordinate system.****Define from 3-marker cluster A, B and C**. The segment= =E2=80=99s origin is the mid-point between the input points A, B and C. The= segment=E2=80=99s axes are aligned with the marker positions. This is inte= nded to be used for a technical coordinate system defined by a marker clust= er consisting of 3 markers.**Define from 3-marker cluster A, B, C and D**. Equivalent= to above, except based on a 4 marker cluster rather than 3.**Offset segment A using segment B.**This defines a segme= nt that uses a source segment A and offsets this using segment=E2=80=99s B = orientation and position. This is typically used when a static offset trans= formation has been calculated between a technical and an anatomical coordin= ate system during a static trial, and stored as a segment. During the dynam= ic trial, you can then offset the technical coordinate system A using the s= tatic offset B, which will recreate the anatomical coordinate system you st= arted out with.

Defines an angle, which can be either 1D or 3D. All 3D angles are Euler = angles.

**Angle: Between A and B.**Defines a 1D angle between A a= nd B. Both A and B can be a vector, a line, a plane or a segment. The angle= returned is the absolute angle between two directional vectors, measured i= n the plane that contains both. The direction vector for a plane is its nor= mal vector, and for a segment its major axis.**Angle: Between A and B around C.**Returns the angle bet= ween A and B, which as above can be a vector, a line, a plane or a segment,= but this time calculated around the vector C (or segment, in which case it= =E2=80=99s the segment=E2=80=99s major axis).**Euler angle: <TOKEN> between A and B.**Defines an= Euler angle between segment A and B, using the <TOKEN> as the Euler = extraction order. The available tokens are XYZ, XZY, YXZ, YZX, ZXY and ZYX.=

Calculates the speed, or the velocity, of an input variable.

**Velocity: A.**Returns the velocity of point A or segmen= t A's origin by differentiating the input variable using a 3-point numerica= l differentiator.**Angular velocity: A.**As above, but returns the angular= velocity of vector A, Euler angle A or segment A's major axis.**Velocity (5-point): A.**As above, except that a 5-point= numerical differentiator is used instead of a 3-point one.**Angular velocity (5-point):****A.**

Calculates the acceleration of an input variable.

**Acceleration: A.**Returns the acceleration of point A o= r segment A's origin, calculated by double-differentiating the input variab= le using a 3-point numerical differentiator.**Angular acceleration: A.**Returns the angular accelerat= ion of vector A, Euler angle A or segment A's major axis.