Syntax
[SVL,SFL]=VLFLshort(VL,FL)
Input Parameter
VL : | | Original vertex list |
FL : | | Original facet list |
Output Parameter
SVL : | | Shortend vertex list |
SFL : | | Shortend and sorted facet list |
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 algorithm is designed to shorten a vertex list (VL) to only include vertices that are actually used in a facet list (FL). It also shortens the facet list by removing any zero facets.
Input Parameters
- VL: The original list of vertices. Each row represents a vertex in 3D space.
- FL: The original list of facets. Each row represents a facet, defined by indices pointing to vertices in VL.
Output Results
- SVL: The shortened vertex list, containing only vertices used in FL.
- SFL: The shortened and sorted facet list, with zero facets removed.
Algorithm Steps
- Determine which vertices in VL are used in FL using the
ismember
function. This creates a logical index (XL) of used vertices.
- Create the shortened vertex list (SVL) by selecting only the rows in VL that correspond to used vertices, ensuring uniqueness and stability in order.
- Map the original facet list (FL) to the new indices in SVL to create the shortened facet list (SFL).
- Sort the shortened facet list (SFL) using the
FLsort
function.
- If SFL is empty, set SVL to an empty array and exit the function.
- Check if the vertex [0 0 0] is present in SVL and whether it is used in SFL.
- If [0 0 0] is present but not used, remove it from SVL and adjust SFL indices accordingly.
Algorithm explaination created using ChatGPT on 2025-08-19 07:28. (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