Grasshopper

algorithmic modeling for Rhino

Hey there,

I'm trying to make a catenary arch with a width and max height dimensions. I know this has been asked before but I havn't found any solutions yet.

from research the threads and links posted I'm concluding that:

1) y = a cosh (x/a) can't be balanced so only a (catenary constant) is on one side

2) therefore Newton Iteration has to be used to find a

luckily from looking at Giulio's GH script from previous threads this has already been done in VB, and I hope he doesn't mind me posting his VB script here.

Only problem is, being useless in VB I don't know how to modify it so I can plug in a series of x pts and max height to get a. Giulio's script solves the problem of the two ends of the catenary curve not being on the same horizontal plane and not max height.

anyone can give me some pointers?

Thanks :)



links to catenary and Newton, also same problem being solved in Revit:
http://en.wikipedia.org/wiki/Catenary
http://en.wikipedia.org/wiki/Newton_iteration
http://revitmotion.blogspot.com/2010/02/catenary-pt-1-math.html

also attached Giulio's VB bit on Newton's Iteration and my own clumsy GH catenary solver using a as input and gives max height in a panel.

Views: 2917

Attachments:

Replies to This Discussion

Hey, I was just looking at this! Giulio's script bases the Catenary function on the curve length, not max height, which is a bit trickier.

My first though is to say, ok, we have 2 points and a height. This means that we know both point's Y values, and the relation of one X value to the other. What we are missing is where the apex point's X value is. If we add to both points a "fudge factor, Xo" allowing for the apex point's X value to be variable, we get 2 simultaneous eqns with 2 unknowns, Xo and A, which is the catenary function coefficient. [this is important so that we don't unintentionally preset the catenary coefficient]

so..
Y1 = A cosh ((X1-Xo)/A) - A
Y2 = A cosh ((X2-Xo)/A) - A

This is solvable, but because cosh (x) = (e^x + e^-x) / 2, we can't separate one of the unknown variables or use one of the other easy techniques. I used Matlab's fsolve function, but obviously while it is very doable to hitch up Matlab to Grasshopper, having this functionality in your script would be ideal.

These are just my meandering thoughts, I'm sure someone on the internet that is better at maths than me has an explicit solution worked out.

Here is what I wrote in Matlab:
iA=1;
iXo=1;
X1=4;
Y1=10;
X2=-3;
Y2=7;
F = @(V) [V(2)*cosh((X1-V(1))/V(2))-V(2)-Y1;V(2)*cosh((X2-V(1))/V(2))-V(2)-Y2];
InitialGuess = [iXo;iA];
Options = optimset('Display','iter');
XY = fsolve(F, InitialGuess, Options);

*Matlab code taken/edited from help file on solving nonlinear simultaneous eqns: http://www.mathworks.com/support/solutions/en/data/1-15NRJ/index.html
Good, so to solve the simultaneous NL equations one could implement the trust region reflective algorithm that fsolve() calls...

http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brno...

If I have time I'll code this up at the end of the week and put it into my catenary component if you just want to wait. Once it's stable I'll make the component public and it will accept any 2 points and apex height (relative to one of the base points) and return a NURBS approximation of a catenary curve (Thanks David!) and apex point. If I have time I'll include an input vector that sets the direction. Fun stuff, it should be a useful component.
that would be amazing. can't wait to see what it looks like :)

thx
Hi Gozchips (hello also to Ben),
last month I discussed the same problem with Giulio and I developed a small GH definition (no Vb script inside at all, just standard components) useful for generating catenary arches based on non planar points, by defining the maximum height too.
If I properly understand your problem this definition would be the answer. Is it so?
Are you going to use this definition just to solve a pure mathematical problem or is it related to an architectural project?

Waiting for your answer I post a screenshot of the definition working into Rhino environment.
You'll also find some information on a previous step of the definition following this link: http://www.grasshopper3d.com/photo/albums/ghaudi-1

Hope to have been useful in someway!
Best,

Matteo
Attachments:
Hey Matteo,

That is awesome, how do you do that?! So you didn't have to use any iterations at all? My mathematical mind is boggled. Anyways, I am a post-grad architecture student, this is I guess an architectural/structural problem for my project. I'll be interested to see which functions you used, if you don't mind of course :)


PS: I'm away for the next few days, be back shortly.
hey back from the holidays. booo.

anyhow did you give the iteration a go ben?

and any tips on which functions you used Matteo?

anything to save me from moving the slider bar 157 times for 157 differing height catenary arches would be much apprieciated. :P
My thesis is due tomorrow, but I figured out a good algorithm so as soon as I have time....

Best regards,
Ben Sitler

Hey Ben,

I'm working on this problem now, but it doesn't look as if the solution of catenaries was ever posted here.

Do you still have the math to derive a catenary from it's height and two points rather than the length?

Thanks!

Michael M.

Hey Matteo,

I am working on this same problem and your screenshot looks like you've solved the issue?

Do you still have it? Willing to post? Finding catenaries from height would be very useful for me!

Michael M.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service