The Modelling and Analysis of the Mechanics of Ropes