Whitemambaa

The Hanging Chain

Jul 24th, 2013
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. For fun, I am remaking the first "serious" script I ever made: Click two places and it makes a bridge between them. Only this time, It's going to be a suspension bridge that's calculated to be exactly correct, and anchored. After some searching, I found that a chain at rest follows the path of a catenary. I've formulated a system of equations that have a solution, but wolfram can't solve them. The equations are in two dimensions because the chain is contained in a vertical plane.
  2.  
  3. (x_0,y_0)=Point A
  4. (x_1,y_1)=Point B
  5. l=Length of bridge (Must be > distance(A,B) for real solutions)
  6.  
  7. Solve for r_0 and r_1:
  8.  
  9. (cosh(r_1)-cosh(r_0))/(r_1-r_0)=(y_1-y_0)/(x_1-x_0)
  10. (sinh(r_1)-sinh(r_0))*sqrt(((y_1-y_0)^2+(x_1-x_0)^2)/((cosh(r_1)-cosh(r_0))^2+(r_1-r_0)^2))=l
  11.  
  12. r_0 and r_1 depend on eachother, so I'd only have to find one. This is great news for a guessing function.
  13.  
  14. I'll make a guessing function like I did for my sentry at first, but I want to solve this eventually! c:
Advertisement
Add Comment
Please, Sign In to add comment