Syntax
T=TflipR(T)
Input Parameter
Output Parameter
Examples
SGmeshlab(SGtransT(SGflip(SGbox),TflipR(eye(4))))
Copyright 2020-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, TflipR
, is designed to convert a right-hand coordinate system into a left-hand coordinate system. It is part of the SolidGeometry library and was introduced in version 5.0. The function operates on a transformation matrix T
.
Input Parameters
- T: A transformation matrix representing a right-hand frame. It can be a single matrix or a stack of matrices.
Output Results
- T: The transformed matrix representing a left-hand frame.
Algorithm Steps
- Check if the input matrix
T
has more than one matrix along the third dimension (i.e., it is a stack of matrices).
- If
T
is a stack of matrices:
- Iterate over each matrix in the stack.
- For each matrix, extract it using
squeeze
to remove singleton dimensions.
- Recursively call
TflipR
on the extracted matrix.
- Store the transformed matrix back in the stack.
- If
T
is a single matrix:
- Negate the first 3x3 submatrix of
T
to convert the right-hand system to a left-hand system.
Example Usage
The function can be used in conjunction with other functions from the SolidGeometry library, such as SGmeshlab
, SGtransT
, and SGflip
, to manipulate geometric objects. An example is provided in the comments:
SGmeshlab(SGtransT(SGflip(SGbox),TflipR(eye(4))))
This example demonstrates how to apply the TflipR
transformation to an identity matrix, which is then used in a series of transformations on a geometric box.
Algorithm explaination created using ChatGPT on 2025-08-18 22:38. (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