Syntax
FL=FLofTL(TL)
Input Parameter
Output Parameter
FL : | | Facet list (all normal vectors outside) |
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 convert a list of tetrahedrons into a list of facets. The function is named FLofTL
and is part of the SG-Library. Below is a detailed explanation of the algorithm and its parameters.
Input Parameters
- TL: A matrix representing a list of tetrahedrons. Each row corresponds to a tetrahedron, and each tetrahedron is defined by four vertices.
Output Results
- FL: A matrix representing a list of facets. Each row corresponds to a facet, and each facet is defined by three vertices. The normal vectors of these facets point outward.
Algorithm Steps
- Extract the vertices of each tetrahedron from the input matrix
TL
:
a = TL(:,1)
: First vertex of each tetrahedron.
b = TL(:,2)
: Second vertex of each tetrahedron.
c = TL(:,3)
: Third vertex of each tetrahedron.
d = TL(:,4)
: Fourth vertex of each tetrahedron.
- Determine the number of tetrahedrons
n
using size(TL,1)
.
- Construct the initial facet list
FL
by combining the vertices to form four facets for each tetrahedron:
[b c d]
: First facet using vertices b, c, and d.
[b d a]
: Second facet using vertices b, d, and a.
[d c a]
: Third facet using vertices d, c, and a.
[b a c]
: Fourth facet using vertices b, a, and c.
- Reshape the facet list
FL
to ensure the correct format:
- Use
reshape
to rearrange the facets into a (n*4)x3 matrix.
- The reshaping process involves transposing and concatenating the facets to ensure each row represents a single facet.
The final output is a list of facets where each facet is defined by three vertices, and the normal vectors of these facets point outward from the tetrahedron.
Algorithm explaination created using ChatGPT on 2025-08-18 22:09. (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