
Problem
A nonelastic but flexible cable of a fixed length is attached at two points.
Which function describes the points on such an arc?
This article explains.
Given are the length L of the cable and the coordinates of the two ends: (x_{1},y_{1}) and (x_{2},y_{2})
The basics
For a proof of the next functions please refer to Wikipedia, using "catenary" or "hanging cables" as keywords.
The general function describing the hanging cable arc is
y = a.cosh(x/a).....................where cosh(x) = (e^{x}+e^{x})/2
The length L_{1} of an arc from x=0 to x = x_{1} is
L_{1}=a.sinh(x_{1}/a).....................where sinh(x)=(e^{x}e^{x})/2
The next pictures presents some arcs for different values of a:
We notice that the vertex is positioned on the Yaxis, which also is a line of symmetry.
A is the scaling factor, both horizontally and vertically.
For a start, our problem is this:
Known values are the coordinates of points P_{1} and P_{2} and h = x_{1}+x_{2}
In this graph the minimum is y=a, but by adding a value C the function is shifted vertically without a change of L.
So what matters right now is the cable length L=L_{1}+L_{2},
the difference dy = y_{2}y_{1} and the horizontal distance h=x_{1}+x_{2}.
This is what we know:
First we want to know a.
We need to eliminate x_{1}, x_{2}, y_{1}, y_{2} replacing them by the known values L, h and dy.
The calculation of a
Now we apply the rule:
and continue:
Next we apply the rules:
and continue:
One extra step by applying this rule:
and finally we arrive at:
In this equition a has to be solved numerically.
Calculation of b=x_{1}
Knowing a, b=x_{1} may be calculated.
We apply the rule:
and continue:
In the final formula we want P_{1} on the Yaxis, so b = x_{1} is the horizontal shift required.
Note: this is done by replacing x by (xb).
After this shift x_{1} = 0, x_{2} = h.
So far we have only used dy, not y_{1} and y_{2}.
The minimum of the curve is a above the Xaxis.
To make the curve hit points P_{1} and P_{2} a vertical shift is required.
Final formula:
Calculation of c
Knowing a,b and y_{1} directly calculates c:
Delphi program
In this program h (horizontal distance of points) = 20.
procedure calculateArc(var A,B,C : double; y1,y2: double);
//given: linelength, (0,y1) , (20,y2)
//calculate formula y = A*cosh((xB)/A) + C
var a1,a2,QLV,V,dy : double;
begin
a1 := 1;
a2 := 100;
dy := y1y2;
QLV := 0.5*sqrt(sqr(linelength)sqr(dy));
repeat
A := 0.5*(a1+a2);
V := A*sinh(10/A);
if V > QLV then a1 := A;
if V < QLV then a2 := A;
until abs(QLV  V) < 0.0001;
B := A*arcsinh(dy/(2*A*sinh(10/A))) + 10;
C := y1  A*cosh(B/A);
end;
a is solved numerically by clamping between a1 and a2.
Note: the uses clause must include "math".
An example to end this article:

