TofPCVL
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 1.0, Creation date: 2013-01-05, Last change: 2025-09-14
returns the HT matrix for a planar contour vertex list
Description
- (2010) - T3P: T - right hand system from 3 Point. Origin is p1
- (2012) - TofVL: T - Eigenvalues and Center of convexhull of VL
- (2013) - ToPCVL: T - same as T3P based on the first 3 Points
- (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: VLFLcoatPCVL
, CVLplot
, TofVL
Example Illustration
Syntax
T=TofPCVL(PCVL)
Input Parameter
PCVL: | | Planar contour vertex list |
Output Parameter
Examples
VLtransT(VLaddz(PLcircle(10)),TofR([pi/3, pi/3 0],[10 0 0 ])); CVL=ans;
TofPCVL(CVL)
Copyright 2013-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, TofPCVL, computes a transformation matrix for a planar contour vertex list (PCVL). The algorithm is part of the SolidGeometry library and is designed to handle planar contours by using the first three points to define a plane.
Input Parameters
- PCVL: A planar contour vertex list, which is a set of points that define a contour in a plane.
Output
- T: A transformation matrix that represents the orientation and position of the plane defined by the contour.
Algorithm Steps
- The function begins by calling
VLremstraightCVL on the input PCVL to remove any collinear points, resulting in PCVLN.
- It checks if
PCVLN has fewer than three points. If so, it raises an error, as at least three points are needed to define a plane.
- The function then calls
Tof3P with the first three points of PCVLN to compute the initial transformation matrix T.
- The translation component of
T is set to the mean of the points in PCVLN, effectively centering the transformation at the average position of the contour.
- If no output is requested (i.e.,
nargout == 0), the function will plot the contour and the transformation using SGfigure, VLplot, and tplot.
Additional Information
The function is part of a series of transformations and procedures developed by Tim C. Lueth, with various versions and improvements over the years. It is designed to work with other functions in the SolidGeometry library, such as VLFLcoatPCVL, CVLplot, and TofVL.
Algorithm explaination created using ChatGPT on 2025-08-19 07:50. (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