CPLofPLgrow

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 4.3, Creation date: 2018-10-30, Last change: 2025-09-14

creates CPL circles around points of a point list



See Also: CPLbuffer , CPLofPLgrowline

Example Illustration

 missing image of CPLofPLgrow(PL,R)

Syntax

CPL=CPLofPLgrow(PL,R)

Input Parameter

PL: point list [n x 2]
R: Radius

Output Parameter

CPL:

Examples


CPLofPLgrow(PLstar(10),1)
CPLofPLgrow(PLstar(10),2)
CPLofPLgrow([PLstar(10);nan nan;PLstar(5)],1)




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, CPLofPLgrow, is designed to create closed polygon lists (CPL) by generating circles around each point in a given point list (PL) with a specified radius (R).

Input Parameters

Output

Algorithm Steps

  1. Check if the input point list PL is empty. If it is, return an empty list CPL and exit the function.
  2. Use the polybuffer function to create a buffer around the points in PL. The buffer is created with the specified radius R and the type 'points', which indicates that circles are to be created around each point.
  3. Extract the vertices of the resulting polygon from the buffer object ps and assign them to CPL.
  4. If no output argument is specified (i.e., nargout==0), plot the results:
    • Use SGfigure to create a new figure window.
    • Plot the closed polygon list CPL using CPLplot with a green line style ('g-').
    • Plot the original point list PL using PLplot with red dots ('r.').

Example Usage

Algorithm explaination created using ChatGPT on 2025-08-18 22: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