Syntax
[PLB,PL,k,shr]=PLshortestpathinCPLcost(CPL,A,B,[shr,n,smo,CPLG])
Input Parameter
CPL : | | Outer contour with holes as forbidden areas |
A : | | Starting Point A inside the CPL |
B : | | End Point B inside the CPL |
shr : | | shrinkage value; default is sofBB/n |
n : | | number of grid points; default is 100 |
smo : | | 'A*', 'Bezier', 'fft' for smoothening |
CPLG : | | With this function preferred paths can be defined |
Output Parameter
PLB : | | Bezier smoothed path |
PL : | | Grid bases path |
k : | | grid numbers |
shr : | | dynamic shrinkage value |
Examples
CPLunion(PLsquare(10,70)+[-30 0],PLsquare(70,10)+[0 -40]);CPLG=ans;
PLshortestpathinCPLcost(PLcircle([50 20]),[-30,-30],[30,-30],1,50,'A*',CPLG);
PLshortestpathinCPLcost(PLcircle([50 20]),[-30,-30],[30,+30],1,50,'A*',CPLG);
PLshortestpathinCPLcost(PLcircle([50 20]),[-20,-30],[30,-30],1,50,'A*',CPLG);
PLshortestpathinCPLcost(PLcircle([50 20]),[-20,+30],[30,-30],1,50,'a*',CPLG); % obstacle and pathway
PLshortestpathinCPLcost(PLcircle([50 20]),[-20,+30],[30,-30],1,50,'a*'); % without pathway
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