Syntax
[PL,FL]=PLFLofCPLpshape(CPL)
Input Parameter
CPL : | | CPL with enclosed CPLs |
Output Parameter
PL : | | Point list [n x 2] |
FL : | | facet lis [n x 3] |
Examples
PLFLofCPLpshape(CPLsample(3));
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, PLFLofCPLpshape
, is designed to perform a Delaunay triangulation on a given input using the polyshape concept introduced in 2018. Below is a detailed explanation of the algorithm and its parameters.
Input Parameters
- CPL: This is the input parameter representing a closed polyline (CPL) with potentially enclosed CPLs. It is used to define the shape that will be triangulated.
Output Results
- PL: This is the point list, an array of size [n x 2], where each row represents the x and y coordinates of a point in the triangulation.
- FL: This is the facet list, an array of size [n x 3], where each row represents a triangle by indexing into the point list.
Algorithm Steps
- Create a polyshape object
ps
from the input CPL
.
- Check if the polyshape
ps
has vertices:
- If
ps.Vertices
is not empty, proceed with triangulation:
- Create a triangulation object
TR2
from the polyshape ps
.
- Extract the connectivity list from
TR2
and assign it to FL
.
- Extract the points from
TR2
and assign them to PL
.
- If
ps.Vertices
is empty, set PL
and FL
to empty arrays.
- If no output arguments are specified (
nargout==0
), plot the triangulation:
- Call
SGfigure
to create a new figure.
- Use
VLFLplot
to plot the points and facets.
This function is part of the SolidGeometry library and was introduced in version 4.3. It is designed to work with the new polyshape concept for triangulation, providing a modern approach compared to older functions like PLFLofCPLdelaunay
and PLFLofCPLpoly
.
Algorithm explaination created using ChatGPT on 2025-08-19 00:00. (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