How to measure distance between vertex and attractors along mesh surface

Measure Distance Along Mesh Surface V0.gh (140.1 KB)

I like to re-mesh a mesh by color.
The color attribute should be acquired/transformed from distance data(all vertices to the attractors) along a mesh surface.

I guess there might be two ways of doing it:

  1. Geodesic on mesh.
  2. Use mesh edges as routes then measure the shortest path.

I guess the geodesic on the mesh is accurate in extreme cases. I tried it, but the speed was too slow.
I didn’t try the second, because I don’t know how.

Thank you very much!