T2ofT3

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 3.4, Creation date: 2017-02-07, Last change: 2025-08-18

returns 3x3 matrices from 4x4 matrices

Example Illustration

 missing image of T2ofT3(T3)

Syntax

T2=T2ofT3(T3)

Input Parameter

T3:

Output Parameter

T2:

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

Output Results

Algorithm Steps

  1. 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.
  2. Determine the number of matrices, nt, in the third dimension of T3.
  3. 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.
  4. If T3 is a single 4x4 matrix, initialize T2 as a 3x3 identity matrix.
  5. Copy the top-left 2x2 submatrix of T3 into the top-left 2x2 submatrix of T2.
  6. Copy the first two elements of the fourth column of T3 into the third column of T2.
  7. 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