TR3ofTR4

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - TR/Tetrahedrons
Introduced first in SolidGeometry 2.4, Creation date: 2015-08-02, Last change: 2025-09-14

returns the surface triangulation of a tetrahedron

Description

Single line function:
TR3=triangulation(freeBoundary(TR4),TR4.Points);
The function does not (!) remove unnecessary vertices unless rem=true (default is false)

Example Illustration

 missing image of TR3ofTR4(TR4,rem)

Syntax

[TR3,VL,FL,SI]=TR3ofTR4(TR4,[rem])

Input Parameter

TR4: tetrahedron triangulation
rem: remove unused (internal) vertices; default is false

Output Parameter

TR3: surface triangulation
VL: Vertex list
FL: Facet list
SI: FL=SI(FL) => maps to TR4.Points

Examples

TR4=delaunayTriangulation([0 0 0;100 0 0; 0 100 0; 25 25 100]);
TR3ofTR4(TR4)




Copyright 2015-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, TR3ofTR4, is designed to extract the surface triangulation from a given tetrahedron triangulation. It is part of the SG-Library and was developed by Tim Lueth.

Input Parameters

Output Results

Algorithm Steps

  1. Initialize SI as an empty array and rem as false. If a second argument is provided and is not empty, set rem to this value.
  2. Extract the points from TR4 and assign them to VL.
  3. Determine the free boundary of TR4 and assign it to FL.
  4. If rem is true, call the function VLFLselect to remove unused vertices and update VL, SI, and FL.
  5. Suppress specific warnings related to points not being in the triangulation.
  6. Create a new triangulation TR3 using FL and VL.
  7. Restore the previous warning state.
  8. If no output arguments are specified, visualize the triangulation using VLFLfigure and set the view angle.
Algorithm explaination created using ChatGPT on 2025-08-19 00:25. (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