ELofn

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 1.0, Creation date: 2012-12-27, Last change: 2025-09-14

returns an edge list for a closed contour (sorted point list) of n points



See Also: ELofCVL , ELofPL , ELofFL

Example Illustration

 missing image of ELofn(n)

Syntax

EL=ELofn(n)

Input Parameter

n: number of points

Output Parameter

EL: Edge 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 for a closed contour consisting of a specified number of points. The function is named ELofn and is part of the SolidGeometry library.

Input Parameters

Output Results

Algorithm Explanation

The function begins by checking if the input n is a scalar. If it is not, the function assumes n is a matrix and sets n to the number of rows in the matrix. This ensures that n is always treated as the number of points.

The core of the algorithm is the creation of the edge list EL. This is done using the following steps:

  1. Create a row vector from 1 to n, representing the indices of the points.
  2. Create a second row vector from 2 to n, followed by 1. This effectively wraps the last point back to the first, closing the contour.
  3. Combine these two row vectors into a 2-column matrix, where each row represents an edge between two consecutive points.
  4. Transpose the matrix to ensure the correct orientation of the edge list.

The resulting matrix EL is the edge list for the closed contour, where each row contains two indices representing an edge between two points.

Algorithm explaination created using ChatGPT on 2025-08-18 21:55. (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