CPLcorrelate

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 3.9, Creation date: 2017-06-04, Last change: 2025-09-14

correlates the contours from two CPLs

Description

In contrast to PLcorrelate, which correlates points for a single pair of a single contour, this function here correlates contours to prepare the use of PLcorrelate. The correlation List contains in each row the corresponding contours of A and B, the level of the contour (0=most outside) and the parent contour of Ai and the parent contour of Bi
The parameter list contains:
the row number, the parent, the level and the center point [x y]

See Also: FLofPLcorrelation , SGconnect2FS , PLcorrelate , textCVL , PLtransform

Example Illustration

 missing image of CPLcorrelate(CPLA,CPLB,corall)

Syntax

[CLL,NCA,NCB,a,b]=CPLcorrelate(CPLA,CPLB,[corall])

Input Parameter

CPLA: Contour A
CPLB: Contour B
corall: if true all contour are paired; default is false

Output Parameter

CLL: Correlation list [ACi BCi Level PAi PBi]
NCA: Contours of A not existing in contour B
NCB: Contours of B not existing in contour A
a: complete list of used parameter of a [row parent level cx cy]
b: complete list of used parameter of b [row parent level cx cy]

Examples


CPLcorrelate(CPLsample(26),CPLsample(27)) % find exclusive pairs
CPLcorrelate(CPLsample(27),CPLsample(26)) % find exclusive pairs
CPLcorrelate(CPLsample(27),CPLsample(26),true) % pair all contours




Copyright 2017-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

Last html export of this page out of FM database by TL: 2025-09-21