by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PL/Point Lists
Introduced first in SolidGeometry 5.0, Creation date: 2020-12-01, Last change: 2025-09-15
See Also: PLhexalobular
, PLwrench
, PLcircle
, PLcircseg
, PLevolvente
, PLgearDIN
, PLkidney
, PLrand
, PLspiral
, PLsquare
, PLstar
[PL,Rm]=PLinbus([D,n])
D: | DIAMETER NOT RADIUS! default is 1/4 Inch | |
n: | number of faces; default is 6 |
PL: | Point list | |
Rm: | Radius of circle for PLcircle |
PLinbus(10)
This algorithm is a MATLAB function named PLinbus that generates a closed polygon list representing a wrench shape, similar to a circle but with a specified number of faces. It is part of the SolidGeometry library.
D and the number of faces n from the input parameters, using default values if not provided.D is zero, return an empty point list and a radius of zero.n is less than 4. If so, raise an error because a polygon requires at least 4 edges.R as half of the diameter D.Rm using a function dofn(n), which adjusts the radius based on the number of faces.PL using the PLcircle function, which creates a polygon with the specified radius and number of faces.SGfigure and PLplot functions, and annotate the plot with the diameter and radius.To create a polygon with a diameter of 10 mm and the default number of faces (6), use the following command:
PLinbus(10)
Algorithm explaination created using ChatGPT on 2025-08-19 07:18. (Please note: No guarantee for the correctness of this explanation)