Understanding the Pathfinder Library
in
Contributed Library Questions
•
9 months ago
I'm relatively new to Processing, though I've used it for a handful of arduino projects (largely to communicate simple commands via the serial library).
Here's what I'm trying to accomplish: Given an image composed (initially) of black and white pixels, find the shortest path from one given (black) pixel to another given (black) pixel (assume for the moment that a valid path exists). Do not travel on white pixels.
Note: path doesn't have to be the shortest path possible, but should be reasonable (so the A* algorithm, I guess). Though to be honest, at this point I'd be happy with any method that would produce any path that stays off the white pixels...
It seems the
Pathfinder library is perfect for this, but I just can't seem to wrap my head around it. The documentation is... dense... for a beginner. Does anyone have any simple example code that would accomplish what I'm looking to do?
Any help is greatly appreciated.
fasteddy
1