Table of Contents
Array and Matrix Functions
These array and matrix functions can be used anywhere Visual3D allows expressions to be used.
Arrays
Arrays can be thought of as a 1-dimensional ordered list of numerical values.
Vector
Vector(a,b, etc) - creates a vector of the number of components specified
! Create a metric signal with 2 components and one frame Metric_Explicit ! /RESULT_METRIC_FOLDER=PROCESSED /RESULT_METRIC_NAME=VEC2 /METRIC_VALUE=2+3 ; ! Create a vector containing a constant, a two dimensional metric and a 3 dimensional model based signal. Evaluate_Expression /EXPRESSION=vector (1, METRIC::PROCESSED::VEC2, LINK_MODEL_BASED::ORIGINAL::RKNEE_ANGLE) ! /SIGNAL_TYPES= ! /SIGNAL_FOLDER=ORIGINAL ! /SIGNAL_NAMES= ! /RESULT_TYPES=DERIVED ! /RESULT_FOLDERS=PROCESSED /RESULT_NAME=TEST ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE ;
The resulting signal will have the first three columns (one for the constant, one for the vector of 2 components) buffered to the number of frames of RKNEE_ANGLE by replicating the first frame.
List
list(a,b,etc) - creates a list (column vector) of the number of rows specified.
Unit_Vector
unit_vector (a, b, etc) - creates a unit vector of the number of components specified.
Rotation Matrices
Rotation matrices are used throughout Visual3D because they can entirely contain the information regarding a segment's pose.
Rotation Multiply
Rotation_Multiply(a,b) - Multiplies two rotation matrices
Example: Multiply two ROTATION signals
Evaluate_Expression /EXPRESSION=ROTATION_MULTIPLY(ROTATION_INVERSE(ROTATION::ORIGINAL::PELVIS_SHIFTED_4x4),CURRENT_SIGNAL) /SIGNAL_TYPES=ROTATION ! /SIGNAL_FOLDER=ORIGINAL ! /SIGNAL_NAMES= /RESULT_TYPES=ROTATION ! /RESULT_FOLDERS=PROCESSED /RESULT_NAME=_MULT /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE ;
Rotation Inverse
Rotation_Inverse(a) - Calculates the inverse of a rotation matrix
Example: Inverse of a 4×4 ROTATION signal or a 3×3 LINK_MODEL_BASED ROTATION
Evaluate_Expression /EXPRESSION=ROTATION_INVERSE(ROTATION::ORIGINAL::PELVIS_SHIFTED_4x4) /SIGNAL_TYPES=ROTATION ! /SIGNAL_FOLDER=ORIGINAL ! /SIGNAL_NAMES= /RESULT_TYPES=ROTATION ! /RESULT_FOLDERS=PROCESSED /RESULT_NAME=_INV /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE ;
Note: A good description of the inverse of a ROTATION signals can be found here
Rotation Transpose
Rotation_Transpose(a) - Creates the transposition of a rotation matrix.
Example: Transpose of a 3×3 LINK_MODEL_BASED ROTATION signal
Evaluate_Expression /EXPRESSION=ROTATION_TRANSPOSE(ROTATION::ORIGINAL::PELVIS_SHIFTED_4x4) /SIGNAL_TYPES=ROTATION ! /SIGNAL_FOLDER=ORIGINAL ! /SIGNAL_NAMES= /RESULT_TYPES=ROTATION ! /RESULT_FOLDERS=PROCESSED /RESULT_NAME=_T /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE ;
Pose4x4
Pose4x4(a,0,0,0,123) - Creates a 4×4 rotation signal based on translation by a signal “a” and the orientation defined by Euler angles (0,0,0) with the Euler sequence 123.
This function was created in support of the shadow segments feature.
Example: Create a rotation matrix for a shadow segment of the right heel
POSE4X4(R_HEEL,0,0,0,123)
See Also
Go back to see other Expression functions.
