I'd suggest searching for a suitable physics engine, as I suspect there won't be a "quick'n'dirty" solution for this..
Atleast not if you're going to have (variable) elasticity on the rope.
Atleast not if you're going to have (variable) elasticity on the rope.