Syntax
EL=ELomitVLEL(VL,EL)
Input Parameter
VL : | | Vertex list |
EL : | | Edge List, must be sorted |
Output Parameter
EL : | | New Edge list, maybe shorter |
Copyright 2013-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, ELomitVLEL
, is designed to process edge lists derived from grid structures and remove unnecessary edges that have the same direction, resulting in a more concise polygonal description.
Input Parameters
- VL: Vertex List - A list of vertices that define the points in the structure.
- EL: Edge List - A sorted list of edges that connect the vertices in the structure.
Output
- ELN: New Edge List - A potentially shorter list of edges after removing redundant edges.
Algorithm Steps
- Initialize
ELN
as a zero matrix with the same size as EL
and set nn
to 0.
- Determine the contour index list
CIL
from EL
using the function CILofEL
.
- Iterate over each contour index in
CIL
:
- Extract a contour edge list
ELA
from EL
using the current contour indices.
- Generate a vertex contour list
VLC
from VL
using ELA
.
- Identify vertices not on a straight line using
VLremstraightCVL
, obtaining their indices nsi
.
- Filter
ELA
to include only relevant starting points of edges using nsi
.
- Create a new edge list
NEL
with start and end points of relevant edges.
- Determine the number of edges
ne
in NEL
.
- Append
NEL
to ELN
starting from index nn+1
and update nn
.
- Adjust the length of
ELN
to include only the relevant edges.
Algorithm explaination created using ChatGPT on 2025-08-19 07:38. (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