Syntax
T=TofDPhi(D,Phi)
Input Parameter
D : | | Distance in X |
Phi : | | rotation around Z |
Output Parameter
Copyright 2016-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, TofDPhi
, computes a 3x3 homogeneous transformation (HT) matrix for a 2D link. It is part of the SG-Library and was developed by Tim Lueth. The function is used in kinematics and frames, similar to other functions like VLtransR
, VLtransP
, and VLtransT
.
Input Parameters
- D: A vector representing the distance in the X direction. It can have one or two elements. If it has two elements, the second element represents the distance in the Y direction.
- Phi: The rotation angle around the Z-axis. This is extracted from the
varargin
input using the getfuncparams
function, with a default value of 0 if not provided.
Output
- T: A 3x3 homogeneous transformation matrix for 2D transformations. This matrix represents a combination of rotation and translation in a 2D plane.
Algorithm Steps
- Extract the rotation angle
Phi
from the input parameters. If not provided, default to 0.
- Construct the 3x3 transformation matrix
T
using the following elements:
- The first row is
[cos(Phi), -sin(Phi), D(1)]
, representing the rotation and translation in the X direction.
- The second row is
[sin(Phi), cos(Phi), 0]
, representing the rotation in the Y direction.
- The third row is
[0, 0, 1]
, which is standard for homogeneous transformation matrices to maintain the affine transformation properties.
- If the input
D
has more than one element, set the element T(2,3)
to D(2)
, which represents the translation in the Y direction.
Algorithm explaination created using ChatGPT on 2025-08-18 22:51. (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