Syntax
T=TofDPhiH(D,Phi,H)
Input Parameter
D : | | Distance in X |
Phi : | | Rotation around Z |
H : | | Height in Z |
Output Parameter
T : | | Transformation matrix 4x4 |
Copyright 2013-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, TofDPhiH
, computes a 4x4 transformation matrix based on the input parameters. It is part of the SG-Library and was developed by Tim Lueth.
Input Parameters
- D: A vector representing the distance in the X direction. If
D
has more than one element, the second element is used for the Y translation.
- Phi: The angle of rotation around the Z-axis, provided as an optional parameter. If not specified, it defaults to 0.
- H: The height in the Z direction, also provided as an optional parameter. If not specified, it defaults to 0.
Output
- T: A 4x4 transformation matrix that combines translation and rotation based on the input parameters.
Algorithm Steps
- Retrieve the rotation angle
Phi
and height H
from the optional parameters using the getfuncparams
function. If not provided, default to 0.
- Construct the transformation matrix
T
:
- The first row is
[cos(Phi), -sin(Phi), 0, D(1)]
, representing rotation and translation in the X direction.
- The second row is
[sin(Phi), cos(Phi), 0, 0]
, representing rotation.
- The third row is
[0, 0, 1, H]
, representing translation in the Z direction.
- The fourth row is
[0, 0, 0, 1]
, representing the homogeneous coordinate.
- If
D
has more than one element, set T(2,4)
to D(2)
to include translation in the Y direction.
- If no output is requested, call
plotT(T)
to visualize the transformation matrix.
Algorithm explaination created using ChatGPT on 2025-08-19 00:23. (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