Syntax
T=T3ofT2(T,[z])
Input Parameter
T : | | 3x3 HT Matrix |
z : | | optional z value |
Output Parameter
Examples
T=TofPose(Posesample(7)),
T3ofT2(T)
Copyright 2016-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, T3ofT2
, is designed to convert a 3x3 homogeneous transformation (HT) matrix into a 4x4 HT matrix. It is particularly useful in the context of planar mechanism design and supports lists of HT matrices (3x3xN).
Input Parameters
- T: A 3x3 HT matrix or a list of such matrices (3x3xN).
- z: An optional parameter representing the z-value, defaulting to 0 if not provided.
Output
- T: A 4x4 HT matrix or a list of such matrices (4x4xN).
Algorithm Steps
- Retrieve the optional z-value using
getfuncparams
, defaulting to 0 if not specified.
- Determine the number of matrices,
nt
, in the input T
using size(T,3)
.
- If
nt
is greater than 1, initialize a 4x4xN matrix TT
and recursively convert each 3x3 matrix in T
to a 4x4 matrix using T3ofT2
.
- If
T
is a single 3x3 matrix, create a 4x4 identity matrix T3
.
- Copy the 2x2 rotation part from
T
to T3
.
- Copy the translation part from
T
to the fourth column of T3
.
- Assign the z-value to the (3,4) position of
T
.
- If no output is requested (
nargout==0
), visualize the transformation using SGfigure
and plotT
.
Algorithm explaination created using ChatGPT on 2025-08-19 00:03. (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