T3ofT2

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 2.8, Creation date: 2016-01-06, Last change: 2025-09-14

converts a 3x3 HT-Matrix into a 4x4 HT-Matrix

Description

helpful for planar mechanism design.
Since SG-Lib 4.5 support of lists of HT matrices ( 3 x 3 x n )


See Also: TofR , TofVL , TPL , TofDPhiH , T2ofT3 , Tof3P , T2P

Example Illustration

 missing image of T3ofT2(T,z)

Syntax

T=T3ofT2(T,[z])

Input Parameter

T: 3x3 HT Matrix
z: optional z value

Output Parameter

T: 4x4 HT Matrix

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

Output

Algorithm Steps

  1. Retrieve the optional z-value using getfuncparams, defaulting to 0 if not specified.
  2. Determine the number of matrices, nt, in the input T using size(T,3).
  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.
  4. If T is a single 3x3 matrix, create a 4x4 identity matrix T3.
  5. Copy the 2x2 rotation part from T to T3.
  6. Copy the translation part from T to the fourth column of T3.
  7. Assign the z-value to the (3,4) position of T.
  8. 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