CEL=CELofPL(PL)
PL : | Points list (2D), works also with VL (3D) |
CEL : | Contour edge list |
This function, CELofPL
, is designed to generate a contour edge list from a given list of points. It is part of the SG-Library and was created by Tim Lueth on August 14, 2013. The function is similar to ELofCVL
and ELofn
, but different from ELofFL
.
The function begins by determining the number of points, n
, in the input list PL
using the size
function. This is done by checking the number of rows in PL
, as each row represents a point.
Next, the function constructs the contour edge list, CEL
. This is achieved by creating a two-row matrix. The first row is a sequence of numbers from 1 to n
, representing the starting point of each edge. The second row is a sequence from 2 to n
, followed by 1, representing the ending point of each edge. This ensures that the last point connects back to the first point, forming a closed loop.
The resulting CEL
is a matrix where each row represents an edge, with the first column indicating the starting point and the second column indicating the ending point of the edge.