Syntax
CPL=CPLofPLFL(PL,FL,[bound])
Input Parameter
PL : | | Point list |
FL : | | Facet list |
bound : | | if true; the boundaries are |
Output Parameter
Examples
Create a CPL from a planar tesselated surface
[PL,FL]=PLFLofCPLdelaunay(CPLsample(11));
CPLofPLFL(PL,FL)
CPLofPLFL(PL,FL,true)
Copyright 2014-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, CPLofPLFL
, generates a contour point list (CPL) from a given point list (PL) and facet list (FL). It is part of the SolidGeometry library and was introduced to handle planar tessellated surfaces.
Input Parameters
- PL: A list of points, where each row represents a point in 2D space.
- FL: A list of facets, where each row contains indices into the point list (PL) that define a facet.
- bound: An optional boolean parameter. If true, the function converts a surface into a contour point list (CPL) by considering the boundaries.
Output
- CPL: The resulting contour point list, which is a sequence of points that define the contour of the input facets.
Algorithm Steps
- Initialize the
bound
variable to false. If a third argument is provided and is not empty, set bound
to the value of this argument.
- If
bound
is false:
- Determine the number of facets,
n
, from the size of FL
.
- Initialize a zero matrix
PLT
with dimensions n*5
by 2 to store the contour points.
- Iterate over each facet in
FL
:
- For each facet, append its points from
PL
to PLT
, followed by the first point of the facet and a NaN NaN
row to separate facets.
- Assign
PLT
(excluding the last row) to CPL
.
- If
bound
is true:
- Use the
freeBoundary
function to find the edges and new points list (EL
and NPL
) of the triangulation defined by FL
and PL
.
- Call
CPLofPLEL
with NPL
and EL
to generate CPL
.
- If no output is requested (
nargout==0
):
- Create a new figure and set the view to top-down (0,90).
- Plot the facets using
VLFLplot
in red and add lighting with VLFLplotlight
.
- Plot the contour points
CPL
in blue with markers.
Algorithm explaination created using ChatGPT on 2025-08-19 06:43. (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