TRofCPLz

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - TR/Tetrahedrons
Introduced first in SolidGeometry 2.0, Creation date: 2014-12-06, Last change: 2025-09-14

returns a valid tetrahedron representation of a solid

Description

This functions is an extension of the first ideas with DTofPLELz (2014-01-14). This time the appraoch is based on the concepts Closed Polygon Lines (CPL) and Triangulation (TR) wich are both available in Matlab 2014b.

Example Illustration

 missing image of TRofCPLz (CPL,z)

Syntax

TRofCPLz(CPL,z)

Input Parameter

CPL: Closed polygon list for base plate
z: solid height in z-direction




Copyright 2014-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 algorithm is designed to generate a valid tetrahedron representation of a solid using a closed polygon list (CPL) and a specified height (z). The function is part of the SG-Library and was developed by Tim Lueth.

Input Parameters

Algorithm Steps

  1. Call the function PLFLofCPLdelaunay(CPL) to obtain the point list (PL) and face list (FL) from the closed polygon list.
  2. Determine the number of points n in the point list PL using size(PL,1).
  3. Create a vertex list VL by adding a z-coordinate to the points in PL using the function VLaddz. The z-coordinate is set to 0 for the base and 10 for the top.
  4. Display the vertex list VL using textVL(VL).
  5. Sort the face list FL using FLsort(FL).
  6. Create a Delaunay triangulation tt using the vertex list VL.
  7. Extract the free boundary of the triangulation to get the new face list NFL and new vertex list NVL.
  8. Identify the base faces by checking which faces have all vertices with indices less than or equal to n.
  9. Reorder the face list FL to ensure valid tetrahedron formation. Several configurations are tested, and only specific orders work.
  10. Generate the tetrahedron list TL from the face list FL using TLofFL(FL,n).
  11. Create the final triangulation TR using the tetrahedron list TL and vertex list VL.
Algorithm explaination created using ChatGPT on 2025-08-19 01:20. (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