# Catenary lines

Parts such as cables, wires and mooring lines hanging under its own weight will take the shape of a catenary.

## 1  Shape calculation

Assuming a line with length l, a height (between the end points) h, and vertical distance d, we can solve for the sag parameter s by numerically solving the equation

$${2 \over x} \sinh \left({sd} \over 2 \right) - \sqrt{L^2-h^2} = 0$$

A standard numerical solution method, such as the Newton method, works well. If a solution is not found, a catenary shape is not possible for the given parameters.
With the sag parameter found, we can define the following values

$$x_{left} = {1 \over 2} \left( {\ln{{l + d} \over {l - d}} \over s} - d \right)$$

which is the distance.