User Tools

Site Tools


visual3d:documentation:pipeline:expressions:array_and_matrix_functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
visual3d:documentation:pipeline:expressions:array_and_matrix_functions [2024/07/03 17:39] – created sgrangervisual3d:documentation:pipeline:expressions:array_and_matrix_functions [2025/05/16 13:01] (current) – Cleaned up page formatting and added links. wikisysop
Line 1: Line 1:
-====== Array_and_Matrix_Functions ======+====== Array and Matrix Functions ======
  
-==== Arrays ====+These array and matrix functions can be used anywhere Visual3D allows [[visual3d:documentation:pipeline:expressions:expressions_overview|expressions]] to be used.
  
-=== Vector ===+===== Arrays =====
  
-**Vector**(a,b, etc)+Arrays can be thought of as 1-dimensional ordered list of numerical values.
  
-creates a vector of the number of components specified+==== Vector ====
  
 +**Vector**(a,b, etc) - creates a vector of the number of components specified
 +
 +<code>
 ! Create a metric signal with 2 components and one frame ! Create a metric signal with 2 components and one frame
-[Metric_Explicit]+Metric_Explicit
 ! /RESULT_METRIC_FOLDER=PROCESSED ! /RESULT_METRIC_FOLDER=PROCESSED
 /RESULT_METRIC_NAME=VEC2 /RESULT_METRIC_NAME=VEC2
 /METRIC_VALUE=2+3 /METRIC_VALUE=2+3
-**;**+; 
 ! Create a vector containing a constant, a two dimensional metric and a 3 dimensional model based signal. ! Create a vector containing a constant, a two dimensional metric and a 3 dimensional model based signal.
-**Evaluate_Expression**+Evaluate_Expression
 /EXPRESSION=vector (1, METRIC::PROCESSED::VEC2, LINK_MODEL_BASED::ORIGINAL::RKNEE_ANGLE) /EXPRESSION=vector (1, METRIC::PROCESSED::VEC2, LINK_MODEL_BASED::ORIGINAL::RKNEE_ANGLE)
 ! /SIGNAL_TYPES= ! /SIGNAL_TYPES=
Line 25: Line 29:
 /RESULT_NAME=TEST /RESULT_NAME=TEST
 ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
-**;**+; 
 +</code> 
 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. 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: +==== List ====
-=== Unit_Vector ===+
  
-**unit_vector (a, b, etc)** -- creates a unit vector of the number of components specified+**list(a,b,etc)** - creates a list (column vectorof the number of rows specified.
-==== Rotation Matrices ====+
  
-=== Rotation Multiply ===+==== Unit_Vector ====
  
-**Rotation_Multiply**(a,b)+**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 [[visual3d:documentation:kinematics_and_kinetics:pose_estimation|pose]]. 
 + 
 +==== Rotation Multiply ==== 
 + 
 +**Rotation_Multiply**(a,b) - Multiplies two rotation matrices
  
 Example: Multiply two ROTATION signals Example: Multiply two ROTATION signals
-**Evaluate_Expression**+<code> 
 +Evaluate_Expression
 /EXPRESSION=ROTATION_MULTIPLY(ROTATION_INVERSE(ROTATION::ORIGINAL::PELVIS_SHIFTED_4x4),CURRENT_SIGNAL) /EXPRESSION=ROTATION_MULTIPLY(ROTATION_INVERSE(ROTATION::ORIGINAL::PELVIS_SHIFTED_4x4),CURRENT_SIGNAL)
 /SIGNAL_TYPES=ROTATION /SIGNAL_TYPES=ROTATION
Line 47: Line 59:
 /RESULT_TYPES=ROTATION /RESULT_TYPES=ROTATION
 ! /RESULT_FOLDERS=PROCESSED ! /RESULT_FOLDERS=PROCESSED
-/RESULT_NAME=**_MULT**+/RESULT_NAME=_MULT
 /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE
-**;** +
-=== Rotation Inverse ===+</code>
  
-**Rotation_Inverse**(a)+==== Rotation Inverse ==== 
 + 
 +**Rotation_Inverse**(a) - Calculates the inverse of a rotation matrix
  
 Example: Inverse of a 4x4 ROTATION signal or a 3x3 LINK_MODEL_BASED ROTATION Example: Inverse of a 4x4 ROTATION signal or a 3x3 LINK_MODEL_BASED ROTATION
-A good description of the inverse of a ROTATION signals can be found [[[http://www.info.hiroshima-cu.ac.jp/~miyazaki/knowledge/teche0053.html|here]]] + 
-**Evaluate_Expression**+<code> 
 +Evaluate_Expression
 /EXPRESSION=ROTATION_INVERSE(ROTATION::ORIGINAL::PELVIS_SHIFTED_4x4) /EXPRESSION=ROTATION_INVERSE(ROTATION::ORIGINAL::PELVIS_SHIFTED_4x4)
 /SIGNAL_TYPES=ROTATION /SIGNAL_TYPES=ROTATION
Line 63: Line 78:
 /RESULT_TYPES=ROTATION /RESULT_TYPES=ROTATION
 ! /RESULT_FOLDERS=PROCESSED ! /RESULT_FOLDERS=PROCESSED
-/RESULT_NAME=**_INV**+/RESULT_NAME=_INV
 /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE
-**;** +
-\\+</code>
  
 +**Note**: A good description of the inverse of a ROTATION signals can be found [[http://www.info.hiroshima-cu.ac.jp/~miyazaki/knowledge/teche0053.html|here]]
  
-=== Rotation Transpose ===+==== Rotation Transpose ====
  
-**Rotation_Transpose**(a)+**Rotation_Transpose**(a) - Creates the transposition of a rotation matrix.
  
 Example: Transpose of a 3x3 LINK_MODEL_BASED ROTATION signal Example: Transpose of a 3x3 LINK_MODEL_BASED ROTATION signal
-**Evaluate_Expression**+<code> 
 +Evaluate_Expression
 /EXPRESSION=ROTATION_TRANSPOSE(ROTATION::ORIGINAL::PELVIS_SHIFTED_4x4) /EXPRESSION=ROTATION_TRANSPOSE(ROTATION::ORIGINAL::PELVIS_SHIFTED_4x4)
 /SIGNAL_TYPES=ROTATION /SIGNAL_TYPES=ROTATION
Line 81: Line 98:
 /RESULT_TYPES=ROTATION /RESULT_TYPES=ROTATION
 ! /RESULT_FOLDERS=PROCESSED ! /RESULT_FOLDERS=PROCESSED
-/RESULT_NAME=**_T**+/RESULT_NAME=_T
 /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE
-**;** +; 
-=== Pose_Euler2Rotation4x4 ===+</code> 
 + 
 +==== Pose_4x4 ==== 
 + 
 +**Pose_4x4(a,0,0,0,123)** - Creates a 4x4 rotation signal based on signal "a" with the translation of the origin (0,0,0) and the orientation defined by Euler angles with the Euler sequence 123. 
 + 
 +This function was created in support of the [[id=visual3d:documentation:modeling:segments:segment_overview#shadow_segments|shadow segments]] feature.
  
-This was created for the Shadow segments introduced in 2024. +Example: Create a rotation matrix for shadow segment of the right heel 
-Create a 4x4 Rotation from the Visual3D pose of a segment, with the translation of the origin represented in any coordinate system, and the orientation defined by Euler angles and the Euler sequence. +<code> 
-POSE_EULER2ROTATION4X4(R_HEEL,0,0,0,123)+POSE_4X4(R_HEEL,0,0,0,123) 
 +</code>
  
 +===== See Also =====
  
 +Go back to see other [[visual3d:documentation:pipeline:expressions:expressions_overview#functions|Expression functions]].
visual3d/documentation/pipeline/expressions/array_and_matrix_functions.1720028390.txt.gz · Last modified: 2024/07/03 17:39 by sgranger