Syntax
TL=TLofFL(FL,[n])
Input Parameter
FL : | | Facet list |
n : | | number of points in vertex list |
Output Parameter
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 planar facet list into a 2.5D tetrahedron list. It is a work in progress and may not function correctly for more than one triangle.
Input Parameters
- FL: Facet list, which is a matrix where each row represents a triangle defined by three vertex indices.
- n: (Optional) Number of points in the vertex list. If not provided, it is calculated as the maximum vertex index in the facet list.
Output
- TL: Tetrahedron list, which is a matrix where each row represents a tetrahedron defined by four vertex indices.
Algorithm Steps
- Determine the number of vertices,
n
. If n
is not provided as an input, it is set to the maximum vertex index found in FL
. A warning is issued if n
is not provided.
- Construct the tetrahedron list
TL
using the following steps:
- For each facet in
FL
, create three tetrahedrons by adding n
to the vertex indices to form a new layer of vertices.
- The first tetrahedron is formed by the vertices:
[FL(:,1)+n, FL(:,1), FL(:,3), FL(:,2)]
.
- The second tetrahedron is formed by the vertices:
[FL(:,3)+n, FL(:,1)+n, FL(:,3), FL(:,2)]
.
- The third tetrahedron is formed by the vertices:
[FL(:,3)+n, FL(:,2)+n, FL(:,1)+n, FL(:,2)]
.
- Reshape the tetrahedron list
TL
to ensure it is in the correct format. This involves rearranging the rows of TL
to form a matrix where each row represents a tetrahedron.
Algorithm explaination created using ChatGPT on 2025-08-18 22:59. (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