TPL

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

return for vertices of a patch the HT Matrix of the patch center



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

Example Illustration

 missing image of TPL(PL)

Syntax

[T,X,n]=TPL(PL)

Input Parameter

PL: Point list or vertex list

Output Parameter

T: Transformation for Backtransformation
X: Vertex list of transformed vertices
n: length of vertex list

Examples

UL=ULgenerate (VL,FL); % Generate a union/patch list
PFL=FLofUL(UL,nr); % Take all facets of patch 1
PVL=VL(PFL,:); % Make a list of vertices
[T,XL]=TPL(PVL); % NOW TRANSFORM
[GPL,ng]=VLGraham(XL); % Calculate Graham
Y=(T*[GPL ones(size(GPL,1),1)]')'; GPL=Y(:,1:3) % Tranform back




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

Algorithm (Workflow)

This function, TPL, is designed to compute the homogeneous transformation matrix for the center of a patch defined by a list of vertices. It is part of the SolidGeometry library.

Input Parameters

Output Results

Algorithm Steps

  1. Check if the input PL has more than 3 columns. If so, transpose it to convert it into a vertex list (VL).
  2. Calculate the number of vertices, n, and the central point cp of the vertex list by averaging the coordinates.
  3. Subtract the central point from all vertex points to center the vertex list around the origin.
  4. Compute a weight vector w using the modulated arctangent of the vertex coordinates.
  5. Find unique values in w and their indices using the unique function.
  6. Select two points, p1 and p2, from the vertex list using the indices from the unique operation.
  7. Compute the transformation matrix T using the function Tof3P with the origin and the two selected points. Set the translation part of T to the central point cp.
  8. Transform the original point list PL using the inverse of T to get the transformed vertex list X.
  9. If no output is requested, plot the original and transformed vertex lists using SGfigure and VLplot.
Algorithm explaination created using ChatGPT on 2025-08-19 08:02. (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