Syntax
CPLC=CPLarrange(CPLC,[CPL2])
Input Parameter
CPLC : | | is a cell list of CPLs |
CPL2 : | | is the dimension defining contour |
Output Parameter
CPLC : | | Is an NAN separated CPL |
Examples
CPLarrange({PLcircle(4,4), PLcircle(4,3), PLcircle(4)}, PLsquare([40 5]))
Copyright 2023-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 algorithm arranges a set of closed polygon lists (CPLs) to match the width of another CPL in the x-dimension.
Input Parameters
- CPLC: A cell list of CPLs that need to be arranged.
- CPL2: The dimension-defining contour, defaulting to a square with dimensions 80x5 if not provided.
Output
- CPLC: A NaN-separated CPL after arrangement.
Algorithm Steps
- Retrieve the dimension-defining contour
CPL2
using getfuncparams
. If not provided, default to PLsquare(80,5)
.
- Calculate the bounding box
sz
of CPL2
using BBofCPL
.
- Calculate the bounding boxes
a
and b
for each CPL in CPLC
.
- Convert bounding boxes to matrices
BB
and cp
.
- Calculate the width
XX
of each CPL and the cumulative sum DD
for positioning.
- Determine the spacing
dx
between CPLs to fit within the width of CPL2
.
- Iterate over each CPL in
CPLC
:
- Calculate the new position
np
for each CPL based on its index and spacing.
- Translate each CPL to its new position using
PLtransP
.
- Convert the cell list of CPLs to a NaN-separated format using
CPLcell2NaN
.
- If additional arguments are provided, apply a relative transformation using
CPLtransrelCPL
.
- Plot the arranged CPLs and the dimension-defining contour using
CPLplot
.
Algorithm explaination created using ChatGPT on 2025-08-19 08:13. (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