Syntax
T2=T2ofT3(T3)
Input Parameter
Output Parameter
Examples
T=TofPose(Posesample(10)); T=T3ofT2(T);
T2ofT3(T)
Copyright 2017-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 function, T2ofT3
, is designed to convert 4x4 transformation matrices into 3x3 matrices. It is part of the SolidGeometry library and was introduced by Tim Lueth.
Input Parameters
- T3: A 4x4 transformation matrix or a stack of such matrices.
Output Results
- T2: A 3x3 matrix or a stack of such matrices derived from the input.
Algorithm Steps
- Check if the first dimension of
T3
is greater than 4. If so, reshape and permute T3
to ensure it is a stack of 4x4 matrices.
- Determine the number of matrices,
nt
, in the third dimension of T3
.
- If
nt
is greater than 1, initialize a zero matrix TT
of size 3x3xnt
. Loop through each matrix in T3
, convert it using T2ofT3
, and store the result in TT
. Set T2
to TT
.
- If
T3
is a single 4x4 matrix, initialize T2
as a 3x3 identity matrix.
- Copy the top-left 2x2 submatrix of
T3
into the top-left 2x2 submatrix of T2
.
- Copy the first two elements of the fourth column of
T3
into the third column of T2
.
- If no output is requested, call
SGfigure
and Poseplot
to visualize the pose derived from T2
.
Algorithm explaination created using ChatGPT on 2025-08-18 22:19. (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