PLknurled

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PL/Point Lists
Introduced first in SolidGeometry 4.9, Creation date: 2020-08-03, Last change: 2025-09-14

returns a sinus contour on a circle

Description

USED in SGDIN464

See Also: PLknurled , PLstar , SGDIN464

Example Illustration

 missing image of PLknurled(R,n,k,m)

Syntax

PLK=PLknurled([R,n,k,m])

Input Parameter

R: Radius os sequence of Radius (SGLib 5.4)
n: nofrd(R)
k: number of waves
m: offset to R; default is R/20

Output Parameter

PLK: CPLof of knureld contour

Examples


PLknurled(5)
PLstar(5,100,'','','',0.95);
PLknurled([20 18]-1,'',8,1) & Outer Radus is 20 or 18




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, PLknurled, generates a sinusoidal contour on a circle. It is part of the SG-Library and was introduced in SolidGeometry 4.9. The function is used in SGDIN464 and was created by Tim Lueth.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the input parameters using getfuncparams. If parameters are not provided, default values are used.
  2. Calculate the circumference l of the circle using 2 * pi * R.
  3. If multiple radii are provided, iterate over each radius and recursively call PLknurled for each one. Concatenate the results, separating them with NaN values.
  4. If a single radius is provided, generate a circle using PLcircle with n points.
  5. Calculate the angular positions w for each point on the circle.
  6. Convert the Cartesian coordinates of the circle to polar coordinates (t, r).
  7. Apply a sinusoidal offset s to the radius r using sin(w * k) * m.
  8. Convert the modified polar coordinates back to Cartesian coordinates (x, y).
  9. Store the result in PLK.
  10. If no output is requested, plot the result using SGfigure and CPSplot.
Algorithm explaination created using ChatGPT on 2025-08-19 01: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