PLshortestpathinCPL
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - PL/Point Lists
Introduced first in SolidGeometry 4.5, Creation date: 2019-04-01, Last change: 2025-09-14
returns a path inside of a CPL using A* Zelinzky, Lozano-Perez, Dikstra
Description
This function is helpful not only for path planning in 2D but also to define CPLs for Solids inside of a limiting contour between start and endpoints (Base points, Attachment points)
read also the dissertation of Tim Lueth ;-)
See Also: CPLofPLgrowline
, PLshortestpathinCPLcost
Example Illustration
Syntax
[PLB,PL,k,shr]=PLshortestpathinCPL(CPL,A,B,[shr,n,smo])
Input Parameter
CPL: | | CPL |
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 |
Output Parameter
PLB: | | Bezier smoothed path |
PL: | | Grid bases path |
k: | | grid numbers |
shr: | | dynamic shrinkage value |
Examples
CPL=CPLsample(20); CPL=CPLsample(9);
SGfigure; CPLplot(CPL); shg; PLAB=ginput(2);
PLshortestpathinCPL(CPL,PLAB(1,:), PLAB(2,:)); PL=ans(:,1:2);
CPLofPLgrowline(PL,1,true,true); CPLplot(CPL,'b-');
Copyright 2019-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