Syntax
EL=ELofCVL(VL,[close])
Input Parameter
VL : | | Vertex list |
close : | | 'c' if closed, default is 'c' |
Output Parameter
EL : | | Edge list of certex 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 generate an edge list from a given vertex list. It is part of the SolidGeometry library and was created by Tim Lueth. The function is named ELofCVL
and it takes a vertex list as input, with an optional parameter to specify if the list is closed.
Input Parameters
- VL: This is the vertex list, which is a matrix where each row represents a vertex.
- close: This is an optional parameter. If set to 'c', the vertex list is treated as closed, meaning the last vertex connects back to the first. The default value is 'c'.
Output
- EL: This is the edge list generated from the vertex list. Each row in the edge list represents an edge, defined by a pair of vertex indices.
Algorithm Steps
- Initialize the
close
parameter to 'c'.
- Check if a second argument is provided. If so, update
close
with the provided value.
- Determine the number of vertices,
n
, by calculating the number of rows in VL
.
- Check if the
close
parameter is 'c'.
- If
close
is 'c', create an edge list EL
where each vertex connects to the next, and the last vertex connects back to the first. This is done using:
EL = [[1:n]' [2:n 1]'];
- If
close
is not 'c', create an edge list EL
where each vertex connects to the next, but the last vertex does not connect back to the first. This is done using:
EL = [[1:n-1]' [2:n]'];
Algorithm explaination created using ChatGPT on 2025-08-18 22:10. (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