RPofTrelT

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 4.4, Creation date: 2018-11-07, Last change: 2025-09-14

returns the frame T2 in relation to frame T1

Description

simple function T=inv(T1)*T2 or T1\T2;
afterwards rotm2eul(T(1:3,1:3),'XYZ');

See Also: TofR

Example Illustration

 missing image of RPofTrelT(TA,TB)

Syntax

[R,P,A_T_B]=RPofTrelT(TA,TB)

Input Parameter

TA: Frame A
TB: Frame B

Output Parameter

R: Rotation angles (euler) XYZ
P: Distance
A_T_B: Frame B relative to Frame A

Examples


rotm2axang(rot(a))
SG=SGbending(SGofCPLzdelaunayGrid(PL,4,2,2,2),40);




Copyright 2018-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 calculates the relative transformation between two frames, TA and TB, and provides the rotation angles, distance, and the relative frame.

Input Parameters

Output Results

Algorithm Steps

  1. Calculate the relative transformation matrix A_T_B by computing the inverse of TA and multiplying it by TB (i.e., A_T_B = TA\TB).
  2. Extract the translation vector P from the last column of the first three rows of A_T_B.
  3. Compute the rotation angles R using the rotm2eul function on the top-left 3x3 submatrix of A_T_B, specifying the 'XYZ' order for Euler angles.
  4. If no output arguments are specified, visualize the frames using SGfigure and tplot functions, and display the axis-angle representation of the rotation.
Algorithm explaination created using ChatGPT on 2025-08-18 23:27. (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