I just used this catenary formula, from wikipedia:
y=a*cosh(x/a)
a was an input from a slider, and by changing it, the height of the catenary is adjusted
x was an input based upon distance along a line
y was the output.
so when I wrote it in the grasshopper x, y function component, it ended up looking like this:
y*cosh(x/y), with y connected to a slider and x connected to the list of distance values.
Permalink Reply by kho on November 7, 2009 at 12:49am
i'm using this formula to calculate the catenary constant, c.
c + H = c*cosh (L/2c),
where, c = catenary constant
H = maximum sag
L = span
I need to manipulate the equation in such a manner that c is the subject of the equation, in terms of H and L.
How do i go about doing that?
thanks!
Permalink Reply by WT4 on November 7, 2009 at 2:50am
One way to determine the value of c would be to re-arrange it so that all the terms are on the left hand side, ie c-c*cosh(L/2c)+H=0. Then incorporate the LHS into a function component with c as a slider input. Then manipulate the value coming out of the slider until the output from the function is 0. This is then the value of c that you are looking for. Which equation do you then use that involves this c parameter?
Regards
Permalink Reply by kho on November 7, 2009 at 3:23am
i'm writing a FORTRAN programme to calculate the length of required cable and the maximum tension in cable, at support point.
The cable is in a catenary curve, suspended from two towers of equal height.
so i need the ouput, c to be on the LHS only.
is it possible to write the equation as c= "something which doesn't have c"?
kho,
what you are asking for is really the answer to an algebra problem, not a grasshopper problem. You will probably find more help if you ask this question on an algebra forum somewhere.
here is a C# scripting component calculating points of the catenary curve given a line in 3d space and a length. It is also posted here. It solves the variable numerically. Feel free to modify the code. By changing the sign of line.from.z, line.to.z, f(currentX) (simply have a - before), you can have the inverted catenary arch based on the same input.
- Giulio
_____________________
giulio@mcneel.com, Barcelona
However I think the intention behind kho's original post wasn't simply to make a catenary, but to be able to make a catenary based on both a height and a span as inputs. This is something I wish I knew how to do myself, to be able to create a catenary between two given points and with a specified height (rather than a length factor). this is really just an algebra question - how to move variables from one side of the equation to another, so I probably just need to find some math help, which I intend to do soon.