Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
Functions
General
+
A binlary operator which calculates the sum of two variables. The following combinations of argument types are allowed:
argument 1 | argument 2 | result |
---|---|---|
integer | integer | integer |
double | double | double |
integer | double | double |
double | integer | double |
integer | complex | complex |
double | complex | complex |
complex | complex | complex |
complex | integer | complex |
complex | double | complex |
3d vector | 3d vector | 3d vector |
3d matrix | 3d matrix | 3d matrix |
Example
A + B
-
This unary operator changes the sign of the given argument. For matrix argument the matrix inverse is determined.
Types:
Argument | Result |
---|---|
integer | integer |
double | double |
complex | complex |
3d vector | 3d vector |
3d matrix | 3d matrix |
Examples
-A
*
/
abs()
This named function calculates the absolute value of the variable give as argument.
Types:
Argument | Result |
---|---|
integer | integer |
double | double |
complex | complex |
Examples
abs(A) abs(-3)
log()
ln()
mod()
sqr()
sqrt()
re()
im()
pow()
rand()
Trigometric
sin()
cos()
sinh()
cosh()
tan()
tanh()
acos()
This named function determines the acrcos tangens of the given argument.
Argument | Result |
---|---|
integer | double |
double | double |
complex | double |
Examples
acos(a)
asin()
This named function determines the arcos sinus of the given argument.
Types:
Argument | Result |
---|---|
integer | double |
double | double |
complex | double |
Examples
asin(A)
atan()
This named function determines the arcos tangens of the given argument.
Types:
Argument | Result |
---|---|
integer | double |
double | double |
complex | double |
Examples
atan(A)
atan2()
atan2'()
atan2''()
asinh()
This named function determines the arcos sinus hyperbolicus of the given argument.
Types:
Argument | Result |
---|---|
integer | double |
double | double |
complex | double |
Examples
asinh(A)
acosh()
This named function determines the acrcos tangens hyperbolicos of the given argument.
Types:
Argument | Result |
---|---|
integer | double |
double | double |
complex | complex |
Examples
acosh(a)
asin'
This named function determines the first derivative of the arcos sinus of the given argument: 1d/(sqrt(1d-x*x))
Types:
Argument | result |
---|---|
integer | double |
double | double |
complex | double |
Examples
asin'(A)
asin''
This named function determines the second derivative of the arcos sinus of the given argument: x/pow(1-x*x, 1.5).
Types:
Argument | result |
---|---|
integer | double |
double | double |
complex | double |
Examples
asin''(A)
3d
dot()
Determination of the dot product of two given 3d vectors.
Types:
Argument 1 | Argument 2 | Result |
---|---|---|
3d vector | 3d vector |
Examples
dot(A,B)
length()
Determination of the length of a given 3d vector.
Types:
Argument | Result |
---|---|
3d vector | double |
Examples
length(A)
lengthSqr()
Determination of the length square of a given 3d vector.
Types:
Argument | Result |
---|---|
3d vector | double |
Examples
length(A)
dist()
Distance between two points.
Types:
Argument 1 | Argument 2 | Result |
---|---|---|
3d vector | 3d vector | double |
Examples
dist(A,B)
vec()
This named function bundles the three double arguments to a 3d vector result value.
Types:
Argument 1 | Argument 2 | Argument 3 | Result |
---|---|---|---|
double | double | double | 3d vector |
Examples
vec(x,y,z)
angle2()
This named function with three arguments calculates the angle between arrows defined by the first two arguments. The third argument is used to define the sign of the resulting angle. It is interpreted as an arrow which defines the rotation direction to rotate the arrow from the first argument to the arrow of the second argument. If this results in angles more than 180 degrees a negativ angle is given instead.
Types:
Argument 1 | Argument 2 | Argument 3 | Result |
---|---|---|---|
3d vector | 3d vector | 3d vector | double |
Examples
angle2(A,B,t)
circc()
Determination of a circles mid point where all three given arguments are laying on.
Argument 1 | Argument 2 | Argument 3 | Result |
---|---|---|---|
3d vector | 3d vector | 3d vector | 3d vector |
Examples
circc(A,B,C)
angle()
This named function with two arguments calculates the so called atan2(x, y) if the arguments are of the type double. 3d vector arguments are interpreted as arrows and the angle between the two arrows are calculated.
Types:
Argument 1 | Argument 2 | Result |
---|---|---|
double | double | double |
3d vector | 3d vector | double |
Examples
angle(A,B)
align()
If the vectors of both arguments are directed in the same half-space this named function results in a double value of -1, else +1.
Types:
Argument 1 | Argument 2 | Result |
---|---|---|
3d vector | 3d vector | double (-1 or +1) |
norm()
normalize()
If the argument is a tuple with 3 elements, it is interpreted as a vector and the result is the normalized vector (length of the vector is set to 1).
Argument | Result |
---|---|
3d vector | real |
mid()
x()
Extracts the x/first-component of a 3d-vector.
y()
z()
q()
Special fuction useful for 3D geometric calculations
pocL()
Point of contact straight line: The first two arguments define a straight line. The first is a point on this line and the second defines the direction of the line. A perpendicular is dropped from the point defined by the third point to this line and the result value is the point of contact in the straight line.
Types:
Argument 1 | Argument 2 | Argument 3 | Result |
---|---|---|---|
3d vector | 3d vector | 3d vector | 3d vector |
Arguments:
Argument | Description |
---|---|
1 | Point to define a line |
2 | Direction to define a line |
3 | Point to start a second line perpendicular to the line defined by the first two arguments. |
Examples
pocL(A,B,C)
pocP()
Point of contact plane: The first two arguments define a plane. The first is a point in this plane and the second defines the direction of a normal to this plan. A perpendicular is dropped from the point defined by the third point to this plane and the result value is the point of contact in the plane.
Types:
Argument 1 | Argument 2 | Argument 3 | Result |
---|---|---|---|
3d vector | 3d vector | 3d vector | 3d vector |
Arguments:
Argument | Description |
---|---|
1 | Point to define a plane the point lays in. |
2 | Direction of a perpendicular to the plane to define. |
3 | Point to start a line perpendicular to the plane defined by the first two arguments. |
midP()
Determines the point with the minimum distance to two given lines.
Arguments:
Argument | Type | Description |
---|---|---|
1 | Vector 3d | Point to define a the first line. |
2 | Vector 3d | Direction to define the first line. |
3 | Vector 3d | Point to define a the second line. |
4 | Vector 3d | Direction to define the second line. |
pocPL()
Determines the point in the plane the arrows brakes throug the plane.
Arguments:
Argument | Type | Description |
---|---|---|
1 | Vector 3d | Point in a plane. |
2 | Vector 3d | Normal vector of the plane. |
3 | Vector 3d | Point to define arrow. |
4 | Vector 3d | Direction of the arrow |
Special functions useful for human motion analysis
chordv()
Point at distance h from I in the plane IJK forming a right angle between I and J on the opposite side of IJ from K.
This function is useful in locating the center of the knee joint, from the position of the hip joint center and the position of a marker placed on the mid-thigh and lateral condyle of the knee:
- h distance in [mm] of the knee joint center to the lateral knee marker position
- I is set to the lateral knee marker position
- J to the hip joint center position,
- K to the position of the mid-thigh marker.
This is a re-implemementation of the equal named function used in Vicon clinical manager gait analysis software.
This function is used extensively in these models for defining joint centres. Three points are used to define a plane. One of these points is assumed to be a previously calculated joint centre, and a second is assumed to be a real marker, at some known, perpendicular distance (the Joint Centre Offset) from the required joint centre.
It's called a chord because by definition, the three points (two joint centres and the joint marker) lie on the periphery of a circle.
There is also a modified version of the function, which calculates the required joint centre position when the plane definition marker is rotated out of this plane by a known angle around the proposed joint centre axis.
The Knee joint centre (KJC) is calculated in the same manner in the static and dynamic model if no KAD is used.
In the dynamic model, the KJC is determined using the modified chord function, from the global position of the HJC, the thigh wand marker (THI), and the knee marker (KNE), together with the knee offset (KO), and thigh wand angle offset.
KJC is found such that the KNE marker is at a distance of KO from the KJC, in a direction perpendicular to the line from the HJC to KJC.
If a KAD is used the knee joint centre is found such that the angle between the KJC-KNE line and the KJC-THI line, projected onto a plane perpendicular to the HJC-KJC line, is the same as the thigh wand offset angle. The thigh wand offset angle is only calculated if a KAD is used.
There is only one position for the KJC that satisfies these two conditions.
Note that for static trials without a KAD, the anterior-posterior position of the KJC is determined by the position of the THI wand marker, and the value of wand offset value that is entered (if you do not enter a value, a value of zero is assumed). Correct determination of the KJC (and the AJC) is very important, especially for the kinetic calculations. In the clinic, you have to assess which method of marker positioning gives the best estimate of the KJC - using a KAD or using the THI marker.
Types:
Argument 1 | Argument 2 | Argument 3 | Argument 4 | Result |
---|---|---|---|---|
Real | 3d vector | 3d vector | 3d vector | 3d vector |
Arguments:
Argument | Description |
---|---|
h | distance in [mm] of the knee joint center to the lateral knee marker position; half joint width. |
I | Point to define a plane the point lays in, e.g. the lateral knee marker position. |
J | top joint position |
K | stick marker position |
chordv2()
Types:
Argument 1 | Argument 2 | Argument 3 | Argument 4 | Result | |
---|---|---|---|---|---|
Real | 3d vector | 3d vector | 3d vector | 3d vector | 3d vector |
Arguments:
Argument | Description |
---|---|
h | distance in [mm] of the knee joint center to the lateral knee marker position; half joint width. |
I | Point to define a plane the point lays in, e.g. the lateral knee marker position. |
J | top joint position |
K | stick marker position |
offset | offset angle |