Syntax
EL=ELofPL(PL,[op])
Input Parameter
PL : | | Point List |
op : | | if true; the Contour is open; default is false |
Output Parameter
Examples
ELofPL(rand(4,2)*20,true)
ELofPL(rand(4,2)*20,false)
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, ELofPL
, is designed to create an Edge List (EL) from a Point List (PL) of succeeding points. It is part of the SolidGeometry library and was introduced by Tim Lueth.
Input Parameters
- PL: This is the Point List, a matrix where each row represents a point in 2D or 3D space.
- op: This is an optional parameter. If set to true, the contour is considered open. The default value is false, meaning the contour is closed.
Output
- EL: The Edge List, which is a matrix where each row represents an edge connecting two points from the Point List.
Algorithm Steps
- The function begins by determining the value of the optional parameter
op
using getfuncparams
. If op
is not provided, it defaults to false.
- The number of points,
n
, is determined from the number of rows in PL
.
- An initial Edge List,
EL
, is created. It connects each point to the next, and the last point back to the first, forming a closed loop: EL = [1:n; 2:n 1]'
.
- If
op
is true, the last edge, which closes the loop, is removed: EL = EL(1:end-1,:)
.
- If no output is requested (
nargout == 0
), a plot is generated using SGfigure
and PLELplot
to visualize the points and edges.
Algorithm explaination created using ChatGPT on 2025-08-18 22:31. (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