Putting this in general usage, because I’m applying it to chemistry, but shortest path is a frequent problem.
I have a 2D potential energy surface of a molecule as two of its axes rotate, formatted for a contour plot. I am looking to find the least-energetic path between two points.
Here’s a segment of the array:
0.494 0.938 2.252
0.605 1.465 3.177
0.937 2.15 4.163
1.41 2.88 5.072
1.931 3.541 5.777
2.396 4.02 6.168
2.714 4.233 6.19
2.834 4.162 5.865
2.756 3.845 5.261
2.522 3.344 4.465
2.18 2.73 3.568
1.787 2.079 2.659
1.404 1.465 1.823
1.083 0.947 1.119
0.862 0.561 0.579
0.754 0.323 0.216
0.755 0.228 0.027
0.853 0.265 0.0
Each of these is an energy. I’m looking for the barrier to conversion between the 0.0 position and the 0.494 position.