Syntax
SPL=PLsplitpointsofCPL(CPL)
Input Parameter
CPL : | | CPL separated by NaN |
Output Parameter
SPL : | | List of splitpoints created by delaunaytriangulation |
Examples
PLsplitpointsofCPL(CPLsample(16))
PLsplitpointsofCPL([PLcircle(10);nan nan;PLcircle(10)+4])
Copyright 2017-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, PLsplitpointsofCPL
, is designed to extract split points generated by the Delaunay triangulation of a given set of points and edges. It is part of the SG-Library and was created by Tim Lueth.
Input Parameters
- CPL: A set of points and edges, separated by NaN, representing a closed polyline or polygon.
Output Results
- SPL: A list of split points created by the Delaunay triangulation process.
Algorithm Steps
- The function begins by calling
PLELofCPL(CPL)
to separate the input CPL
into points (PL
) and edges (EL
).
- It then suppresses a specific warning related to Delaunay triangulation using
warning('off','MATLAB:delaunayTriangulation:ConsConsSplitWarnId')
.
- A Delaunay triangulation is performed on the points and edges using
delaunayTriangulation(PL,EL)
, resulting in a triangulation object TR2
.
- The split points are extracted from
TR2.Points
, starting from the index size(PL,1)+1
to the end, and stored in SPL
.
- If no output is requested (
nargout==0
), the function visualizes the results using SGfigure
, CPLplot
, and PLplot
to plot the original CPL in red and the split points in blue.
Example Usage
Examples of how to use the function include:
PLsplitpointsofCPL(CPLsample(16))
PLsplitpointsofCPL([PLcircle(10);nan nan;PLcircle(10)+4])
Algorithm explaination created using ChatGPT on 2025-08-19 01:13. (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