CPLselectbynearestP
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 5.2, Creation date: 2022-07-02, Last change: 2025-09-15
returns an index list for selectNaN to select by the neareat Points/CPLs
See Also: selectNaN
, crosstest
, insideCPL
, insideCPS
, isInteriorofCPL
, CPLselectbyP
Example Illustration
Syntax
[ind,ddd]=CPLselectbynearestP(CPL,PL,[aux])
Input Parameter
CPL: | | CPL |
PL: | | Single point to check |
aux: | | density of auxiliary points; default is 0.1 |
Output Parameter
ind: | | index list |
ddd: | | distance to nearest point |
Examples
CPLselectbynearestP(CPLsample(14),[0 0 0])
CPLselectbynearestP(CPLsample(14),[5 0 0])
CPLselectbynearestP(CPLsample(14),[5 0 ;10 -3])
CPLselectbynearestP(CPLsample(14),[25 0]), ii=ans;
selectNaN(CPLsample(14),ii(1));
Copyright 2022-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