Syntax
[CPL,PL,FL,EL,CEL]=CPLofPLalphashape(PL,[])
Input Parameter
Output Parameter
CPL : | | Closed Polygon List of contour (endpoint=startpoint) |
PL : | | Point list (doubled entries removed) |
FL : | | Facet List |
EL : | | Edge list of free boundary sorted |
CEL : | | Contour index list |
Examples
pc=PCofSG(SGsample(25),30000); PL=pc.Location(:,1:2);
CPLofPLalphashape(PL);
Copyright 2018-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, CPLofPLalphashape
, is designed to generate a closed polygon contour around a given point list using the alpha shape method. It is part of the SG-Library and was introduced in SolidGeometry 4.3.
Input Parameters
- PL: This is the original point cloud, which is a list of points in a 2D space.
- varargin: This allows for additional optional parameters to be passed to the function, though they are not explicitly used in the provided code.
Output Results
- CPL: The Closed Polygon List, which represents the contour with the endpoint being the same as the start point.
- PL: The processed point list with duplicate entries removed.
- FL: The Facet List, which contains the facets of the alpha shape.
- EL: The Edge List, which includes the edges of the free boundary, sorted in order.
- CEL: The Contour Index List, which indexes the contour points.
Algorithm Steps
- The function calls
PLFLofPLalphashape
with the input point list PL
and any additional arguments. This function is responsible for computing the alpha shape and returning the processed point list, facet list, closed polygon list, edge list, and contour index list.
- If no output arguments are specified (
nargout==0
), the function proceeds to visualize the results:
- It creates a new figure using
SGfigure
.
- It plots the point list
PL
using VLplot
with a dot marker.
- It plots the closed polygon list
CPL
using CPLplot
with a magenta line of width 2.
The function is designed to be used in scenarios where a visual representation of the alpha shape is needed, and it provides a comprehensive set of outputs for further analysis or processing.
Algorithm explaination created using ChatGPT on 2025-08-19 00:06. (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