title: How to calculate a hanging rope from points of different heights
body: <p>Does anyone knows how to calculate how far a curve should dip down at a certain point, given the two points it's connected to (and maybe weight but it doesn't matter as much)?<br>
  From what I've been looking up, all the formulas involve tension and a few other things, but I only really need to know the coordinates, and can presume these are all constant.</p>
  
  <p>This is the formula I have at the moment, it's very basic so would only work with two points at the same height. One method is from wikipedia and the other I got from somewhere else, they do unfortunately give different results though so I've no idea which is correct</p>
  
  <pre><code>import math
  x=[-2,2]
  a=1.0
  for i in range(x[0],x[1]+1):
      #method 1
      y=a*math.cosh(1/a*i)-a
      #method 2 (from wikipedia)
      y=(a/2)*(math.exp(i/a)+math.exp(-i/a))
  </code></pre>
  
  <p>Oh also, it's for maya, so it'd be a huge help if it could be done from the normal python functions without having to install scipy.optimise</p>
  
  <p>Thanks :)</p>