Syntax
h=CPLplotbufferlines([CPL,w])
Input Parameter
CPL : | | CLosed Polygon Line |
w : | | distance between the buffer lines, default is maximal 15 lines |
Output Parameter
Examples
SGfigure; CPLplotbufferlines(CPLsample(29));
SGfigure; CPLplotbufferlines(CPLsample(25),.1);
Copyright 2020-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, CPLplotbufferlines
, is designed to plot buffer lines for a closed polygon contour. It is part of the SolidGeometry library and was introduced in version 4.8. The function takes in parameters related to closed polygon lines and the distance between buffer lines, and outputs a handle to the graphics.
Input Parameters
- CPL: This is the Closed Polygon Line. If not provided, the function defaults to using
CPLsample(29)
.
- w: This parameter represents the distance between the buffer lines. If not specified, it defaults to the minimum positive value of
ss
divided by 30, with a maximum of 15 lines.
Output
- h: This is the handle to the graphics object created by the function.
Algorithm Steps
- The function begins by retrieving the
CPL
parameter using getfuncparams
. If not provided, it defaults to CPLsample(29)
.
- It calculates bounding box parameters using
sofBB
and BBofCPL
functions.
- The distance
w
is determined using getfuncparams
. If not specified, it defaults to min(ss(ss>0))/30
.
- An iterative process begins with the initial
CPLi
set to CPL
.
- In each iteration,
CPLbuffer
is called to create a buffer line at a distance -w
from the current polygon.
- If the resulting
CPLi
is not empty, it increments the counter s
and plots the buffer line using CPLplot
with a color determined by colofn
.
- The process repeats until
CPLi
becomes empty, indicating no further buffer lines can be created.
- The function returns the handle
h
to the plotted graphics.
Algorithm explaination created using ChatGPT on 2025-08-19 00:33. (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