Shortest and longest paths between polygons

88 Views Asked by At

first of all I have to say, I am not a mathematician, I am software developer. Right now I am working on the app for pilots.

Part of the app is creation of the navigation task. The task is defined by turn points in certain order which could be lines, circles, but let's say just general polygons.

I want to find algorithm for computing longest and shortest paths between all the polygons. I have to keep the order of the polygons and it doesn't matter if I just touch the border of the polygon or go right through the center. I just have to visit all of them.

I expect to find two sets of points. One set defining the shortest path and one set for the longest one. Each point lies within corresponding turn point polygon.

Could you please help me find a solution? Thank you.

Example