convexEL

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

returns a sorted list of convex edge/contour segments

Description

This function is similar to sortEL, but returns the edges in a convex order. It takes twice the time of sortEL

Example Illustration

 missing image of convexEL(p1,p2,p3,VL,EL)

Syntax

[SEL,l,o]=convexEL(p1,p2,p3,VL,EL)

Input Parameter

p1: p1 of the corresponding convex triangle
p2: p2 of the corresponding convex triangle
p3: p3 of the corresponding convex triangle
VL: Vertex list
EL: Unsorted edge list

Output Parameter

SEL: sorted edge list
l: index list for each new contour segment
o: number of contour segments




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 sort a list of edges in a convex order. It is an auxiliary procedure that takes twice the time of the `sortEL` function. The function `convexEL` takes several input parameters and returns a sorted edge list, an index list for each new contour segment, and the number of contour segments.

Input Parameters

Output Results

Algorithm Steps

  1. Call the `sortEL` function to sort the edge list `EL`. This function returns the sorted edge list, an index list `indlist`, and the number of contour segments `o`.
  2. Determine the number of edges `n` and extend `indlist` by appending `n+1` to it.
  3. Convert the vertex list `VL` from Cartesian to barycentric coordinates with respect to the triangle defined by `p1`, `p2`, and `p3` using the `carttobaryVL` function.
  4. Iterate over each contour segment (from 1 to `o`):
  5. After processing all contour segments, call `sortEL` again to ensure the final edge list `SEL` is sorted correctly.
Algorithm explaination created using ChatGPT on 2025-08-19 00:54. (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