Syntax
T=Tupright(T)
Input Parameter
Output Parameter
Copyright 2012-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This algorithm is designed to adjust a homogeneous transformation (HT) matrix so that the z-dimension is oriented upright. The function is named Tupright
and is part of the SG-Library, specifically categorized under auxiliary procedures. Below is a detailed explanation of the algorithm based on the provided MATLAB code.
Input Parameters
- T: This is the original HT matrix that needs to be adjusted. It is a 4x4 matrix commonly used in robotics and computer graphics to represent transformations including rotation and translation.
Output Results
- T: The corrected HT matrix with the z-dimension oriented upright.
Algorithm Steps
- The function checks the value of the element at the third row and second column of the matrix
T
(i.e., T(3,2)
).
- If
T(3,2)
is equal to -1, it negates the first two columns of the first three rows of T
. This operation effectively flips the orientation of the x and y axes.
- Next, the function checks the value of the element at the third row and first column of the matrix
T
(i.e., T(3,1)
).
- If
T(3,1)
is equal to -1, it swaps the first two columns of the first three rows of T
and negates the new first column. This operation reorients the x and y axes to ensure the z-axis is upright.
The algorithm assumes that the input matrix T
is a valid HT matrix and that the operations performed will correctly orient the z-dimension upright. The function does not handle any other cases or provide error checking for invalid input matrices.
Algorithm explaination created using ChatGPT on 2025-08-18 21:50. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21