PLELradialEdgesofCPL
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PLEL/Point List/Edge List
Introduced first in SolidGeometry 5.6, Creation date: 2025-09-13, Last change: 2025-09-15
Creates 2D/3D radial edges in closed contours and open paths
Use carefully: The 'PLELradialEdgesofCPL' function has not yet been extensively tested
Description
This function from 2025 always interprets the input parameter as a closed path. There is no check for path overlaps in 2D or 3D. This function also works with VL (3D); this function does not remove collinear points. This function does not correct overlaps and intersections of contours. It does not change the orientation. The starting point will possibly moved in case of closed contours, if there is a kink at the start point.
For paths instead of contours, "open" must be used explicitly.
Some other effects of matlab made it necessary to reimplement the function in 2025
PLELofCPL (2014) was reimplemented by Tim Lueth (2018) using the polyshape class, but matlab changed the behavior of polyshape several times (collinear points, etc.), which made it impossible to track the influences of the changes. Even empty CPLs became a problem in 2024.
This function is NOT using PLELofCPL anymore.
This function uses ELofn to create the edge lists
This function uses "VLremsuccident" to open CPLs
This function uses VLtangentcirc to create the arcs.
It uses selectNaN to separate nan separated contours.
The concept of "open" will be used in future
See Also: VLremsuccident
, VLtangentcirc
Example Illustration
Syntax
[NPL,NEL,NCPL]=PLELradialEdgesofCPL(CPL,[R,"open","closed"])
Input Parameter
CPL: | | open or closed point list in 2D or 3D |
R: | | maximum radius >0 ; default is 1 |
"open": | | if used, the result will be an open path not a contour |
"closed": | | if used, the result will a closed contour; this is default. |
Output Parameter
NPL: | | New Point list; with modified start point |
NEL: | | New edge list; |
NCPL: | | NEW CPL list; open or closed as defined |
Examples
PLELradialEdgesofCPL(VLaddz(CPLofPL(PLsquare)))
PLELradialEdgesofCPL(VLaddz(CPLofPL(PLsquare)),'open')
[a,b,c]=PLELradialEdgesofCPL(VLaddz(CPLsample(3))); SGfigure; VLplot(c,'b*-'); c
[a,b,c]=PLELradialEdgesofCPL(VLaddz(CPLsample(3)),'open'); SGfigure; VLplot(c,'b*-'); c
Copyright 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
Last html export of this page out of FM database by TL: 2025-09-21