Syntax
[TA,TB]=Tof2Tcrossez(T1,T2)
Input Parameter
Output Parameter
TA : | | Moved Frame 1 |
TB : | | Moved Frame 1 |
Examples
Tof2Tcrossez(SGTget(YKLower,'B'),SGTget(YKLower,'F')*TofR([0 pi 0]))
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, Tof2Tcrossez
, is designed to adjust the position of two frames, T1 and T2, relative to a crossing point. It is a faster implementation than the function cross2L
.
Input Parameters
- T1: The first frame, represented as a 4x4 transformation matrix.
- T2: The second frame, also represented as a 4x4 transformation matrix.
Output Results
- TA: The adjusted position of Frame 1.
- TB: The adjusted position of Frame 2.
Algorithm Steps
- Calculate the transformation matrix
T
from T1 to T2 using the inverse of T1 multiplied by T2: T = T1\T2
.
- Extract the z-component of the translation from the transformation matrix
T
: z1 = T(3,4)
.
- Compute the crossing point
cp1
for T1 using its translation and the z-component: cp1 = (T1(1:3,4) + z1*T1(1:3,3))'
.
- Calculate the transformation matrix
T
from T2 to T1: T = T2\T1
.
- Extract the z-component of the translation from the transformation matrix
T
: z2 = T(3,4)
.
- Compute the crossing point
cp2
for T2: cp2 = (T2(1:3,4) + z2*T2(1:3,3))'
.
- Calculate the accuracy of the crossing points by finding the norm of the difference between
cp1
and cp2
: acc = norm(cp1-cp2)
.
- Adjust the position of Frame 1 by setting its translation to
cp1
: TA = T1; TA(1:3,4) = cp1'
.
- Adjust the position of Frame 2 by setting its translation to
cp2
: TB = T2; TB(1:3,4) = cp2'
.
- If no output arguments are specified, visualize the frames and crossing points using plotting functions.
Algorithm explaination created using ChatGPT on 2025-08-19 00:43. (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