Syntax
w=diffTincz(TA,TB)
Input Parameter
Output Parameter
w : | | relative rotation of Bx relative to Ax |
Examples
diffTincz(eye(4),TofR(rot(0,pi/10,pi/10),[0 0 1]))
Copyright 2021-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, diffTincz
, calculates the relative inclination of the ez vector of frame B with respect to frame A. It is part of the SG-Library and was introduced in SolidGeometry 5.1.
Input Parameters
- TA: A 4x4 transformation matrix representing frame A.
- TB: A 4x4 transformation matrix representing frame B.
Output
- w: The relative rotation of the Bx vector relative to the Ax vector, calculated using the dot product of the ez vectors of both frames.
Algorithm Steps
- Extract the ez vectors from both transformation matrices,
TA(1:3,3)
and TB(1:3,3)
.
- Calculate the angle
w
between these vectors using the acos
function on their dot product.
- Round the result
w
to five decimal places for precision.
- If no output is requested (i.e.,
nargout==0
), perform additional visualization steps:
- Calculate a scaling factor
s
using the function sofBB
and BBofVL
on the position vectors of TA
and TB
.
- Call
SGfigure
to set up a figure with a range from -30 to 30.
- Plot the frames
TA
and TB
using tplot
, with different scaling factors for visualization.
This function is particularly useful for determining the relative orientation of two frames in 3D space, especially when the ez vectors are not orthogonal.
Algorithm explaination created using ChatGPT on 2025-08-19 00:01. (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