ezof3P

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 4.3, Creation date: 2018-09-04, Last change: 2025-09-14

returns ez and R for 3 Point Rotation Matrix

Description

Same as T3P and Tof3P
x=p2-p1; ex=p2/norm(x);
z=cross(x,p3-p1); ez=z/norm(z);
y=cross(ez,ex); ey=y/norm(y);

See Also: TofR , TofVL , TPL , TofDPhiH , T3ofT2 , T2P , Tof3P

Example Illustration

 missing image of ezof3P(VL)

Syntax

[ez,R,T]=ezof3P(VL)

Input Parameter

VL: Vertex List

Output Parameter

ez: ez vector [x y z]
R: Rotation Matrix [ex ey ez]
T: Transformation matrix [ex ey ez p1]

Examples


ezof3P([0 0 0;10 0 0; 0 10 0])




Copyright 2018-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, ezof3P, calculates the unit vector ez and the rotation matrix R for a 3-point rotation matrix based on a given vertex list VL.

Input Parameters

Output Results

Algorithm Steps

  1. Extract the three points p1, p2, and p3 from the vertex list VL.
  2. Calculate the vector x as the difference between p2 and p1.
  3. Normalize x to get the unit vector ex.
  4. Calculate the vector z as the cross product of x and the vector from p1 to p3.
  5. Normalize z to get the unit vector ez.
  6. Calculate the vector y as the cross product of ez and ex.
  7. Normalize y to get the unit vector ey.
  8. Construct the rotation matrix R using the unit vectors ex, ey, and ez.
  9. Compute the transformation matrix T using the function TofR with inputs R and p1.
  10. If no output arguments are specified, visualize the results using plotting functions.
Algorithm explaination created using ChatGPT on 2025-08-19 00:45. (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