I'm trying to solve the classic problem of a (weightless) rope of length s hanging between any two points P1 and P2. Wikipedia gives the following guidance:

Name:  catenaryFormula.jpg
Views: 3421
Size:  82.4 KB

I can use the last formula to derive the value of a. My present method is to loop with trial values of a starting from 1 at intervals (e.g. 0.25) until the difference between the two sides of the equation passes through a minimum. No doubt there are more efficient ways to do the numerical analysis but it seems to work.

My problem is that, having derived the value of a, I cannot see how to relate the resulting catenary y = a * cosh (x/a) to the original locations P1 and P2. The Wiki formula depends only on the x difference (h) and y difference (v), not on the actual X and Y values. The instruction to "translate the axes" doesn't help me because I can't actually do that until I know the location of the vertex.

So can someone suggest how to "translate the axes" or an alternative approach?

BB