TofPEul
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 3.1, Creation date: 2016-12-02, Last change: 2025-09-14
return from euler angle and position an HT matrix
See Also: TofR
, TofVL
, TPL
, TofDPhiH
, T3ofT2
, Tof3P
, T2P
, TofP
, TofPez
Example Illustration
Syntax
T=TofPEul(p,eul,[seq])
Input Parameter
p: | | Point in 3D |
eul: | | Euler angle [phiz phiy phix] - not x y z |
seq: | | default is 'ZYX' |
Output Parameter
T: | | Homogenous Transformation Matrix |
Examples
TofPEul([10 10 10],[0 0 pi/2])
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, TofPEul, computes a Homogeneous Transformation Matrix (HT matrix) from a given 3D point and Euler angles. It is part of the SolidGeometry library and was introduced by Tim Lueth.
Input Parameters
- p: A 3D point represented as a vector
[x, y, z].
- eul: Euler angles given as a vector
[phiz, phiy, phix]. These angles represent rotations around the z, y, and x axes, respectively.
- seq (optional): A string representing the order of rotations. The default sequence is
'ZYX', meaning the rotations are applied in the order of z-axis, y-axis, and then x-axis.
Output
- T: The resulting Homogeneous Transformation Matrix, which combines the rotation defined by the Euler angles and the translation defined by the point
p.
Algorithm Steps
- Retrieve the rotation sequence using the function
getfuncparams. If no sequence is provided, use the default 'ZYX'.
- Compute the rotation matrix from the Euler angles using the function
eul2rotm, which takes the Euler angles and the rotation sequence as inputs.
- Construct the Homogeneous Transformation Matrix
T by combining the rotation matrix with the translation vector [p(1); p(2); p(3)]. The matrix T is structured as follows:
T = [ R | p ]
[ 0 | 1 ]
where R is the rotation matrix and p is the translation vector.
- If no output argument is specified, visualize the transformation using the functions
SGfigure and tplot with a scale factor of 10.
Algorithm explaination created using ChatGPT on 2025-08-18 23: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