algorithmic modeling for Rhino
Hi all,
After searching through the forum and finding these three discussions on catenary curves, I still have not found something workable for what I am trying to do. Like Michael, I am trying to make a catenary curve based on the sag height of the chain (or height of the arch) as opposed to the chain length that Grasshopper already provides. While the scripts made by Daniel (here) and Lukas (here) were impressive and helpful, I need to be able to input start & end points that aren't necessarily at the same height and still be able to specify the overall maximum height (from the higher point) of the catenary. I couldn't get either of their scripts to work for that. I tried modifying their code (after converting Daniel's C# to VB), but didn't get very far due to not knowing the Rhino SDK very well. Basically, I would like to make a component like one I laid out in the image below.
Inputs: Point A, Point B (not necessarily at the same height), Height (or sag), a Point the specified height is relative to, Direction of gravity (so Height is measured in this direction), and possibly the Number of control points desired for building the curve.
Outputs: the interpolated Curve, maybe the Control Points used to build the Curve, and it might be handy to output the Length of the Curve (chain/arch) as well as the mysterious "a" value in the standard catenary formula since we'll need to calculate those anyway.
Alternatively, a second option (the 2nd VB component with fewer parameters in the image) is much simpler and could potentially replace/upgrade the catenary component already in Grasshopper. "Type" would be the type of parameter we're inputting to get the desired curve: either max height, chain length (which the current component already does), or the "a" value, useful for making an extended curve with a pre-determined "a" value (maybe?). And the "Val" would obviously be that value (length, height, or a). "Grav" is gravity direction/vector. As for the output, the curve is obviously necessary, but maybe outputting the "a" value or the length might be helpful. Seems like this addition to the existing component would be pretty useful, especially for architecture.
I've included the ghx file with the scripts in progress...the first one is a straight conversion of Daniel's. The second, my trying to modify it with the new parameters (which is where I got stuck...seems to be hard-coded to the XZ plane). And the third, just a visual representation of the simplest (and most ideal?) form.
Thanks for any help you can provide!
Cheers,
Will
Tags:
I don't think that it is a straight forward case of Algebra. You have to do it with a solver
After reading some more I think that might be the case...there are so many variables.
That may be possible when you use the data recorder (I didn't test anemone with it), check the "Record Data" in loop end.
Thanks for pointing that out, I actually work now on anemone optimization... checking each step with vs debugger (that ain't easy as there are now 5 different options which gives 32 running modes).
Want to do some beta testing ?
Yes, that's how I originally had it hooked, I switched to Grasshopper data recorder to see if it didn't happen there but still happened.
I reinstalled it and now it works properly, I probably didn't replace the older version correctly.
You should make it possible to remove D0 in case you just need the counter and a break to terminate the loop.
Sure, I'd like to beta test.
When I try to teach the concept of recursion in the past I've used scripting components, but I'd prefer to use something simpler that people can download. I don't like so much hoopsnake since I find a bit awkward the way wires have to be connected back to the same component. I think people will understand better this idea of two components connected with a wire that brings the information back.
Are there any restrictions on using anemeone? can I use it to teach recursion in a university or academy?
So that's where I know this licence from :)
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by