visual3d:documentation:pipeline:expressions:array_and_matrix_functions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:pipeline:expressions:array_and_matrix_functions [2024/06/19 12:49] – sgranger | visual3d:documentation:pipeline:expressions:array_and_matrix_functions [2025/06/20 13:38] (current) – [Pose_4x4] wikisysop | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== arrays | + | ====== Array and Matrix Functions ====== |
- | ==== vector ==== | + | These array and matrix functions can be used anywhere Visual3D allows [[visual3d: |
- | **vector**(a, | + | ===== Arrays ===== |
- | creates a vector | + | Arrays can be thought |
- | ! create a metric signal with 2 components and one frame | + | ==== Vector |
- | [metric_explicit] | + | |
- | ! / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | ! create a vector containing a constant, a two dimensional metric and a 3 dimensional model based signal. | + | |
- | **evaluate_expression** | + | |
- | /expression=vector (1, metric:: | + | |
- | ! / | + | |
- | ! / | + | |
- | ! / | + | |
- | ! / | + | |
- | ! / | + | |
- | / | + | |
- | ! / | + | |
- | **;** | + | |
- | 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**(a,b, etc) - creates a vector of the number of components |
- | ==== unit_vector ==== | + | |
- | **unit_vector (a, b, etc)** -- creates a unit vector of the number of components | + | < |
- | ===== rotation matrices ===== | + | ! Create |
+ | Metric_Explicit | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
- | ==== rotation multiply | + | ! Create a vector containing a constant, a two dimensional metric and a 3 dimensional model based signal. |
+ | Evaluate_Expression | ||
+ | /EXPRESSION=vector (1, METRIC:: | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | ; | ||
+ | </ | ||
- | **rotation_multiply**(a,b) | + | The resulting signal will have the first three columns |
- | example: multiply two rotation signals | + | ==== List ==== |
- | **evaluate_expression** | + | |
- | /expression=rotation_multiply(rotation_inverse(rotation:: | + | |
- | / | + | |
- | ! / | + | |
- | ! / | + | |
- | / | + | |
- | ! / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | ==== rotation inverse | + | |
- | **rotation_inverse**(a) | + | **list(a, |
- | example: inverse of a 4x4 rotation signal or a 3x3 link_model_based rotation | + | ==== Unit_Vector |
- | a good description of the inverse of a rotation signals can be found [[[http:// | + | |
- | **evaluate_expression** | + | |
- | /expression=rotation_inverse(rotation:: | + | |
- | / | + | |
- | ! / | + | |
- | ! / | + | |
- | / | + | |
- | ! / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | \\ | + | |
+ | **unit_vector (a, b, etc)** - creates a unit vector of the number of components specified. | ||
- | ==== rotation transpose | + | ===== Rotation Matrices ===== |
- | **rotation_transpose**(a) | + | Rotation matrices are used throughout Visual3D because they can entirely contain the information regarding |
- | example: transpose of a 3x3 link_model_based rotation signal | + | ==== Rotation Multiply |
- | **evaluate_expression** | + | |
- | /expression=rotation_transpose(rotation:: | + | |
- | / | + | |
- | ! / | + | |
- | ! / | + | |
- | / | + | |
- | ! / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | ==== pose_euler2rotation4x4 | + | |
- | this was created for the shadow segments introduced in 2024. | + | **Rotation_Multiply**(a,b) - Multiplies two rotation matrices |
- | create | + | |
- | pose_euler2rotation4x4(r_heel, | + | |
+ | Example: Multiply two ROTATION signals | ||
+ | < | ||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | ==== 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 | ||
+ | |||
+ | < | ||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | **Note**: A good description of the inverse of a ROTATION signals can be found [[http:// | ||
+ | |||
+ | ==== Rotation Transpose ==== | ||
+ | |||
+ | **Rotation_Transpose**(a) - Creates the transposition of a rotation matrix. | ||
+ | |||
+ | Example: Transpose of a 3x3 LINK_MODEL_BASED ROTATION signal | ||
+ | < | ||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | ! / | ||
+ | ! / | ||
+ | / | ||
+ | ! / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | ==== Pose_4x4 ==== | ||
+ | |||
+ | **Pose_4x4(a, | ||
+ | |||
+ | This function was created in support of the [[visual3d: | ||
+ | |||
+ | Example: Create a rotation matrix for a shadow segment of the right heel | ||
+ | < | ||
+ | POSE_4X4(R_HEEL, | ||
+ | </ | ||
+ | |||
+ | ===== See Also ===== | ||
+ | |||
+ | Go back to see other [[visual3d: |
visual3d/documentation/pipeline/expressions/array_and_matrix_functions.1718801391.txt.gz · Last modified: 2024/06/19 12:49 by sgranger