Syntax
CPL=CPLcopyradial(CPL,R,n,[ow])
Input Parameter
CPL : | | Original Contour |
R : | | Radius |
n : | | number of copies |
ow : | | offest angle |
Output Parameter
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
- CPL: The original contour that needs to be copied.
- R: The radius at which the copies will be placed.
- n: The number of copies to be created.
- ow (optional): The offset angle for the initial position of the copies. If not provided, it defaults to 0.
Output
- CPL: The resulting set of copied contours arranged radially.
Algorithm Steps
- Retrieve the offset angle
ow
using getfuncparams
. If not specified, it defaults to 0.
- Calculate the angular distance
dw
between each copy using the formula dw = 2*pi/n
.
- Create an array
w
of angles from 0 to 2*pi
with a step of dw
, adjusted by the offset ow
.
- Compute the positions
PL
for each copy using polar coordinates, converting them to Cartesian coordinates with [cos(w) sin(w)]*R
.
- Use the function
CPLcopypatternPL
to generate the radial copies of the contour based on the calculated positions PL
.
- 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