Syntax
EFL=EFLgenerate(VL,FL,[fi])
Input Parameter
VL : | | Vertex list |
FL : | | Facet list |
fi : | | optional facet index, if only one facet is of interest |
Output Parameter
Copyright 2012-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, EFLgenerate
, is designed to compute an extended facet list from a given vertex list and facet list. It calculates the normal vector and size of each facet. The function is part of the SG-Library and is used in conjunction with ULgenerate
. It is recommended to use VLFLvertexfusion
before this function to ensure accuracy.
Input Parameters
- VL: Vertex list, a matrix where each row represents a vertex in 3D space.
- FL: Facet list, a matrix where each row represents a facet by indexing into the vertex list.
- fi (optional): Facet index, an integer specifying a single facet of interest. If not provided, the function processes all facets.
Output
- EFL: Extended facet list, a matrix that includes the original facet indices, the normal vector, and the size of each facet.
Algorithm Steps
- Initialize
fi
to 0. If a third argument is provided, set fi
to this value.
- If
fi
is 0, process all facets:
- Compute the cross product of vectors formed by the vertices of each facet to find the normal vector
v
.
- Calculate the norm (magnitude) of each normal vector and store it in
l
.
- Normalize the normal vectors by dividing each component by its corresponding norm.
- Round the normalized vectors to four decimal places.
- Count the number of facets with dimensions outside the range (0.01, 1000) and store in
w
.
- Combine the facet list, normal vectors, and sizes into
EFL
.
- If
fi
is not 0, process only the specified facet:
- Compute the cross product for the specified facet to find its normal vector
v
.
- Calculate the norm of this vector and normalize it.
- Combine the facet indices, normal vector, and size into
EFL
.
- Check if the size is outside the range (0.01, 1000) and print a warning if so.
- Round the normal vector components to four decimal places.
- Remove any degenerated facets (those with NaN values in the normal vector) from
EFL
.
Algorithm explaination created using ChatGPT on 2025-08-19 06:49. (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