algorithmic modeling for Rhino
Hi guys,
Im relatively new to GH and I wanted to ask how I can randomly make surfaces appear within a boundary curve.
I want to be able to control the amount of squares
and
the individual sizes.
Another thing that would be sweet if I could control the orientation/ rotation of each square but thats not a must.
If anyone could point me in the right direction?
Thanks in advance!
Tags:
Can they overlap? Or is this a "nesting" problem?
Not that I want to get into it, but if it's nesting for CNC work, you'll want to look at how others have done that. Not trivial.
"Another thing that would be sweet if I could control the orientation/ rotation of each curve but thats not a must."
Which curves do you refer to? As I understand it, you want square surfaces randomly located within a boundary curve, to be able to control de amount of these square surfaces, and individually control the size of the squares. Lastly, to be able to control the rotation and orientation of each square surface (which I'm supposing is what you meant with: of each curve), right?
Yes, just like you said.
I only miswrote that part. Sorry for the confusion
Does the bounding curve has to be of an irregular shape, or does a rectangular bounding curve works just fine? If a rectangular bounding curve works well for you, then it is very easy to do so with the Populate 2D component, as you input a rectangle into it as the bounding curve, and a number slider to control the amount of points, and it places the specified amount of points within the bounding curve in a random manner (these points would then be used to place the square surfaces there).
Do you need to control the size of each and all of the points individually? Or just being able to set a range of possible sizes for the squares is good for you? The second option is quick & easy to accomplish, the first one is a bit harder (not much though), but very tedious if you want to control all of them individually (and the more points, the more work, obviously); you could also have a mix of both (set a range of possible sizes for the squares to be sized randomly within that range, and then be able to select one/or more specific squares to adjust their size individually). Also possible, to adjust the size of the squares with attractors (you could have the squares gradually increase or decrease their sizes as they get closer to a point/curve you set as the attractor).
Let me know which way would you rather go. For the irregular shape bounding curve, I am not sure how to solve it right now, so I would need time to figure that up. For the rest, I could help you right away.
hey, thank you for your answer.
I have a bounding curve already set. So I dont have to worry about that. They curve is closed so I guess you could call it a surface. And therein I want the squares.
Well If possible id like both possibilities and see what suits me best. But if thats too much the simplest one will suffice.
The idea with size depending on attractor isn't necessary I believe.
See if this works for you (as I'm not sure what works best for you), let me know if there's something you don't understand well, or I'm you'd like to change or add some feature. This is as far as I could go right now to give you the most control as possible. If you want the bounding curve to be something different than a rectangle, it has to be a complete different (and way mora complex) definition.
Regards!
Hmm ...
This is a very challenging puzzle if :
(a) you want actually to pack the rectangles with the minimum possible "waste" space. Pack of course means no overlap(s). On the other hand Kangaroo2 can do something on that matter. I mean: get the "state" of things as are made with the def attached (or rather a far better version) and pack them as efficiently is possible.
(b) you want to individually control on-the-fly (at creation time or later) each rectangle (and maybe store/manage variations of solutions).
both doable with code (C# in my case), impossible with components. In fact the latter is 10++ times easier than the former.
in the mean time get this attached
Cool!.... I sometimes wonder where you find the time Peter, I'm sure its not related to boring wife, boring life :) .....please keep well!
Wow! Thanks a bunch! I tried copying everything by doing it step by step and there I tried using my set surface as the boundary but my pc froze :P
Ill try again later tonight but I wanted to thank you already.
Froze? Hmm ... customer satisfaction issue rise here > can you post ASAP the surface?
BTW: Love your nickname, he he.
BTW: With regard ifs (a), (b) mentioned above ... er ... allow you some time to get the gist of that GH thingy (including that Kangaroo physics engine marvel: the best add-on that GH has to offer by 1000++M miles) and then start the mother of threads: I want to individually modify this this and that ... blah, blah
he he
As soon as I Connect panel to panel it just freezes :(
I want it on the larger surface and not touching the rectangle. But I can do that by just varying the sliders.
I have no clue what causes it to freeze.
Going to look into Kangaroo too now.
Got so many ideas but not the ability to use them or try them...arrgh frustrating. hahaha
Where's the surface???
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