algorithmic modeling for Rhino
I am running a class where we are trying to design wetland ponds and exploring parametric ways of calculating volumes, etc.
We are trying to:
Set a depth and change a volume and use this to resize or offset a curve (not a square, though we are starting with one) drawn in Rhino.
Students with more math, or rather, more recent math, are working at it but we cant work out how to determine an offset by comparing two areas, one the desired area, the other what we want.
Any thoughts?
Tags:
Thanks Tom.
We haven't done any coding but do you have an example of this type of curve. We also don't have anemone or Galapagos... I am guessing there is no easy example of how to do this...
Indeed as Tom said recursion (i.e. something that does something calls itself until a stop condition is true) is the classic way to do it.
I have somewhere a "similar" example (but what was the def's name?) but using solely C# (simple code mind) and not a single native component. Notify if it's worth attempting to find(?) it.
But ... I have a faint memory of something quite "similar" that David R did recently ... although I can't recall the thread's name > Alzheimer appears to be an issue, he he.
BTW:
Given a nurbs (I hate meshes) "landscape" define a point/focus of interest and then:
(a) given the max depth of the reservoir find the corresponding water "solid" if a reservoir is possible (that's a bit primitive, mind: simple boolean ops).
(b) given the volume of the reservoir find the water "solid" if a reservoir is possible (and the max depth).
is this what you are after?
Latest (and greatest) news:
Good: Def mentioned found (using 7*triple espressos + Karma).
Bad: Slower than any Harley Davidson.
Ugly: Recursive method (the core of the matter) is removed in order to avoid embarrassment issues: a week++ to finish, that is. That said using meshes could be way faster (but I hate meshes like my sins).
Recursion guideline: By assuming possible "pockets" (and not just a single reservoir) - see image above > raise the trimming plane in steps until no water (i.e. open curves) is on hand or the volume shrinks (i.e. a neighbor "pocket" overflows). Then lower the plane using a new (smaller) step until the volume is back. Then raise (smaller step), lower (ditto) etc etc until the N of loops is reached or the resulting volume is within tolerance (vs the required).
There's no guarantee that for a given focus point a reservoir with the desired volume exists.
Another option is to use Daniel Piker's new Kangaroo 2.0 - which has a geometry solver allowing you to input area and volume constraints on the manipulation of polygons or meshes. What is important to define is how the shape expands or contracts (ie are edges parallel and angles equal? Or do you allow certain ones to flex/elongate etc?) Robust offsetting is actually non-trivial, especially when the shape is highly convoluted or the offset distance is large (cf. https://en.wikipedia.org/wiki/Straight_skeleton or http://fcacciola.50webs.com/Offseting%20Methods.htm)
Hey Julian,
I attach a realy primitive approach for your question (if I understood it right ) without recursion or coding.
Well, in this definition you have your surface, make flow curves, get pond locations, make sections each N distance, get volumes inside the pond zone and select curves by your desired pond volume....
Dont have much time to make a good looking definition, but you can try it and see if it works for you.
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