by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 4.9, Creation date: 2020-08-16, Last change: 2025-09-14
CPLD=CPLconvexhulldelaunay(CPL)
CPL: | CPL |
CPLD: | convex hull of the delaunay triangulation |
CPLconvexhulldelaunay(CPLsample(14));
CPLconvexhulldelaunay(CPLsample(19));
CPLconvexhulldelaunay(CPLsample(21));
CPLfillgap(CPLsample(21),3)
This function, CPLconvexhulldelaunay, computes the convex hull of a given Closed Polygon List (CPL) using Delaunay triangulation. Below is a detailed explanation of the algorithm and its parameters:
delaunayofCPL with the first two columns of the CPL matrix. This function performs Delaunay triangulation on the 2D points provided.delaunayofCPL includes a triangulation object TR2 and an edge list EL.CPLofPLEL is then called with the points from TR2 and the edge list EL to construct the convex hull, which is stored in CPLD.CPLremstraightAmin to potentially remove straight lines or minimal angles from CPLD, but it is not executed in the current implementation.nargout==0), the function proceeds to visualize the results:SGfigure, and the view is set to a top-down perspective with view(0,90).CPLD is plotted in green with markers and lines using CPLplot.CPLplot.CPSplot in green.The function is part of a library for handling closed polygon lists and is designed to work with other functions like CPLconvexhull, delaunayofCPL, CPLharbour, CPLfillin, CPLfillinside, and CPLfillgap.