TofVL
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 1.0, Creation date: 2012-05-03, Last change: 2025-09-14
returns the main axis of a vertex list or SG
Description
This procedure is similar to TPL but calculates the covariance matrix and the main axis and the Eigen values. The results are very similar but less heuristic.
If 4 or more vertices are used, the convex hull is calculated first.
if force is true; ez is forced as new ez vector; this allows to rotate in only two dimensions;
if ez=[1 0 0] the function fails, since ex is [1 0 0] by definition
IN SG-LIB 5.0 we have to following concepts:
- (2010) - T3P: 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: TofVLFL
, VLeigenvect
, Tof3P
, TofPez
, PLofVL
, TofCVL
, TofR
, TPL
, TofDPhiH
, T3ofT2
, T2P
, TofP
Example Illustration
Syntax
T=TofVL(VL,[ez,force])
Input Parameter
VL: | | Vertex list or Solid Geometry |
ez: | | ez vector for turning; default is empty |
force: | | if true ez is forced as ez vector; default is false |
Output Parameter
T: | | HT Matrix of the main axis |
Examples
TofVL(rand(4,3)); % turns in all direction
TofVL(rand(4,3)*100,[0 0 1]); % would only change something if ez=[0 0 -1]
TofVL(rand(4,3)*100,[0 0 1],true); % turns only around ez;
Copyright 2012-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