ELofPL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 1.1, Creation date: 2013-12-27, Last change: 2025-09-14

creates an EL for a PL of succeeding points



See Also: ELofn

Example Illustration

 missing image of ELofPL(PL,op)

Syntax

EL=ELofPL(PL,[op])

Input Parameter

PL: Point List
op: if true; the Contour is open; default is false

Output Parameter

EL: Edge List

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

Output

Algorithm Steps

  1. The function begins by determining the value of the optional parameter op using getfuncparams. If op is not provided, it defaults to false.
  2. The number of points, n, is determined from the number of rows in PL.
  3. 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]'.
  4. If op is true, the last edge, which closes the loop, is removed: EL = EL(1:end-1,:).
  5. 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