Search This Blog

Wednesday, September 23, 2026

Plotting the Shortest Path for a Bunch of Points (Nearest-Neighbor) - a smidge better. : )

 

I posted this yesterday: https://lesley-o0.blogspot.com/2026/09/plotting-shortest-path-for-bunch-of.html

It pestered me all night about potential math limitations and accuracy in the route plots (mostly because I could see in my brain more efficient route than yesterday's image).
 

So, I...

  • switched everything to numpy.
  • restructured code (more formal, less bloby).
  • added datetime to the output file name so multiple runs to not overwrite existing results.
  • arg'd with the "map.png" as the input default.

Better route!   : )


Source: https://github.com/LesleyPhillips/py-PlotShortestPath-np