TflipR

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 5.0, Creation date: 2020-09-05, Last change: 2025-09-14

turns the current right hand system into an inverted left hand system

Description

T(1:3,1:3)=-T(1:3,1:3);

See Also: , SGflip

Example Illustration

 missing image of TflipR(T)

Syntax

T=TflipR(T)

Input Parameter

T: Right hand frame

Output Parameter

T: Left hand frame

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

Output Results

Algorithm Steps

  1. Check if the input matrix T has more than one matrix along the third dimension (i.e., it is a stack of matrices).
  2. 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.
  3. 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