Syntax
p=pofT(T)
Input Parameter
Output Parameter
Examples
TofRd([0 0 pi/10],30); pofT(ans)
Copyright 2023-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, pofT
, extracts the translation part of transformation matrices or lists of transformation matrices. It is part of the SolidGeometry library.
Input Parameters
- T: A transformation matrix or a list of transformation matrices. It can be a 4x4 matrix, a 3x3 matrix, or a cell array of such matrices.
Output Results
- p: The translation vector extracted from the transformation matrix or matrices. It is a row vector or a list of row vectors.
Algorithm Steps
- Check if
T
is a cell array:
- If true, initialize
p
as a zero matrix with dimensions based on the number of elements in T
and the size of the first element in T
.
- Iterate over each element in
T
and recursively call pofT
to extract the translation part, storing the result in p
.
- If no output is requested, call
CPLrack4PL
with p
, calculate s
using sofBB
and BBofCPL
, and plot using tplot
.
- Return from the function.
- If
T
is not a cell array, check its size:
- If
T
is a 4x4 matrix, extract the translation part from the first three elements of the fourth column and transpose it to form p
.
- If
T
is a 3x3 matrix, extract the translation part from the first two elements of the third column and transpose it to form p
.
- If
T
does not match these sizes, raise an error indicating the wrong format.
- If no output is requested, call
SGfigure
and CPLrack4PL
with p
.
Algorithm explaination created using ChatGPT on 2025-08-18 23:06. (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