Tof3P
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 1.0, Creation date: 2010-08-06, Last change: 2025-09-14
returns a 4x4 HT matrix given by three points (sort3P)
Description
T = T3P (p1, p2, p3) returns an homogenous transformation matrix (HT) calculated from 3 points p1, p2, p3:
t=p1; R=(ex, ey, ez)
ex=ex=(p2-p1)/norm(p2-p1)
ez=z/norm(z); z=cross (ex,p3-p1);
ey=cross (ez, ex);
T=[ex ey ez p1(1:3); 0 0 0 1]
if argument p1 is a vertex list, the first three points of VL are used
IN SG-LIB 5.0 we have to following concepts:
- (2010) - Tof3P: T - right hand system from 3 Point. Origin is p1
- (2012) - TofVL: T - Eigenvalues and Center of convexhull of VL
- (2015) - PLofVL: T - ex is the longest distance of mean(VL)
- (2016) - TofPez: T - ey has no x dimension or ex=[0 0 1]
- (2019) - TofVLFL:T - ez is calucated from the face normals, o=mean(VL)
- (2020) - VLeigenvect - same as TofVL but no convex hull and faster
- (2020) - TofCVL: T - ez is calucated from the edge normals, o=mean(VL)
See Also: TofR
, TofVL
, TPL
, TofDPhiH
, T3ofT2
, T2P
Example Illustration
Syntax
T=Tof3P(p1,p2,p3)
Input Parameter
p1: | | point 1 of the triangle, or VL |
p2: | | point 2 of the triangle |
p3: | | point 3 of the triangle |
Output Parameter
T: | | HT Matrix describing the 3P coordinate system |
Examples
Tof3P([0 0 0; 10 0 0; 10 10 10])
Tof3P([0 0 0],[ 10 0 0], [10 10 10])
Copyright 2010-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
Last html export of this page out of FM database by TL: 2025-09-21