CPLcopyradial

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

copies a CPL radial with radius and number of copies

Description

DOES NOT ROTATE THE CONTOUR.
FOR ROTATION use CPLcopyunionradial


See Also: CPLcopypattern , CPLcopypatternPL , CPLcopyunionradial

Example Illustration

 missing image of CPLcopyradial(CPL,R,n,ow)

Syntax

CPL=CPLcopyradial(CPL,R,n,[ow])

Input Parameter

CPL: Original Contour
R: Radius
n: number of copies
ow: offest angle

Output Parameter

CPL: copied contours

Examples


CPLcopyradial(PLcircle(10),30,3);
CPLcopyradial(PLsquare([3 20]),30,3);




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, CPLcopyradial, is designed to create multiple copies of a given contour (CPL) arranged radially around a specified radius. It does not rotate the contour itself but positions copies in a circular pattern.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the offset angle ow using getfuncparams. If not specified, it defaults to 0.
  2. Calculate the angular distance dw between each copy using the formula dw = 2*pi/n.
  3. Create an array w of angles from 0 to 2*pi with a step of dw, adjusted by the offset ow.
  4. Compute the positions PL for each copy using polar coordinates, converting them to Cartesian coordinates with [cos(w) sin(w)]*R.
  5. Use the function CPLcopypatternPL to generate the radial copies of the contour based on the calculated positions PL.
  6. If no output is requested (nargout==0), plot the results using SGfigure, CPLplot, and PLplot to visualize the contours and their radial arrangement.
Algorithm explaination created using ChatGPT on 2025-08-19 00:02. (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