vtkDijkstraGraphGeodesicPath scalar weight question

When UseScalarWeights is enabled, the cost is calculated by dividing the distance by the squared scalar weight:

cost = distance/(scalar*scalar)

Does anyone know why this equation is used instead of adding, or multipying/dividing by the scalar without squaring? My first though is that it’s to ensure that the sign is always positive, but then the following would work as well:

cost = distance/abs(scalar)

Does anyone use vtkDijkstraGraphGeodesicPath filter for drawing lines on surfaces?

We have a few ideas for improving it, especially how point scalars are used to compute the “shortest” path, but if there is no interest then we would just do these enhancements in our own repository in a derived class.