Syntax
EL=ELofFLpatch(FL)
Input Parameter
FL : | | Facet list (n x m) % m>=3 |
Output Parameter
Examples
FL=[1 2 3 4 5;5 4 3 2 1]; ELofFLpatch(FL), ELunique(ans)
Copyright 2022-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, ELofFLpatch
, converts a facet list (FL) into an edge list (EL). It is designed to handle a list of patches and return the edges in the order they appear in the patches.
Input Parameters
- FL: A facet list represented as an n x m matrix, where n is the number of patches and m is the number of vertices per patch. The condition m >= 3 must be satisfied, meaning each patch must have at least three vertices.
Output Results
- EL: An edge list represented as an n x 2 matrix, where each row corresponds to an edge defined by two vertices.
Algorithm Explanation
- Determine the number of edges per patch by calculating the number of columns in the facet list,
ne = size(FL,2)
.
- Create an extended facet list,
FLE
, by appending the first column of FL
to the end of FL
. This ensures that the last vertex of each patch connects back to the first vertex, forming a closed loop.
- Determine the number of patches,
nf = size(FL,1)
.
- Initialize a counter,
cc
, to zero. This counter will track the position in the edge list where the next set of edges will be inserted.
- Iterate over each vertex in the patch (from 1 to
ne
):
- Extract the edges for the current vertex by selecting two consecutive columns from
FLE
, ELi = FLE(:,k:k+1)
.
- Insert these edges into the edge list,
EL
, starting from the position indicated by cc
.
- Update the counter,
cc
, by adding the number of patches, cc = cc + nf
.
The function effectively converts each patch into a series of edges, ensuring that the edges are listed in the order they appear in the patch. This approach is more general than previous implementations, allowing for a flexible and efficient conversion of facet lists to edge lists.
Algorithm explaination created using ChatGPT on 2025-08-18 23:19. (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