algorithmic modeling for Rhino
First of all, I'm pretty new to grasshopper. This one's just an experiment that I might want to turn into something to build.
Basically, what I'm trying to do is sort of a reverse voronoi. The further I get away from point X, the smaller I want the cells to be. Just smaller, not denser. At least in theory, what I'm shooting for is cells that are roughly the same size, but still have the voronoi edges, so when I put many points close together, it doesn't change much, but instead of the cells getting bigger in the less point populated areas, I just want less cells that are the same size.
I think the image kind of explains it a little, but as you can see, it's just not practical, because I'm planning on using a lot more points in the end.
I'm just kind of stuck right now, because I can't really find a way to determine the distance of each polyline from my circle, or if it's inside the circle or not, and then split the tree into "inside the circle" and "outside the circle"
Any help is appreciated, because what I've got there is just an embarrassing mess…
Tags:
I don't really understand what you're trying to do; the image doesn't really seem to correspond to your description and I haven't any idea what "smaller, not denser" cells would look like. Can you maybe upload a hand sketch or some other image that is closer to what you are trying to accomplish?
As Andrew, I don't really understand.
I made here a small definition that increases the distance of offset when points are far from other points, but I don't know if it is what you want.
Thanks for your kind replies, Rhydro's modification is close, though I'm still trying to reproduce it, or understand what's being done. The points are processed and analysed completely separate from the voronoi, but in the end joined with the offset, yet match the corresponding voronoi cell… There's still a lot I have to figure out :P
I admit, it's badly explained, shouldn't have asked right after working on it, kind of failed to get to the point…
The distance is supposed to depend on the distance from one center point or area, meaning the further away my voronoi cell gets from point X, the higher the offset value.
I used "roughly the same size" because it's not the final cell size I want to change, but the offset value which eventually gives me the final cell. I know the offset value could probably be determined by the surface area of the offset cell, but I thought that would only overcomplicate it, because the exact size isn't important to me (though it seems like it should, or at least would make things easier if it were)
The basic idea is - if I set many points, denser in the middle and more spread out the further away they get from the center (doing that in processing eventually), or point X, and apply a voronoi on them, the cells get bigger where the points are further apart. I want them to be the same size as in the center though, or ideally, even smaller, so in the end, I get the shape of a voronoi cell, but not the look of a regular voronoi.
I tried to illustrate it in a little sketch, the arrows meaning that the offset cell is supposed to be smaller.
I thought about using the explode to give me a list of all the polylines the voronoi creates. After that, evaluate the distance to my set point X and based on that, modify the offset value of that single polyline.
Though I think I'm thinking too java like for that. The explode basically gives me an array of polylines, I'd send that entire array through a loop, first find its center, evaluate how far it's away from point X, divide the default offset by the distance, check if it's not smaller than A (as I noticed it messes up if the offset value is too small) and apply it to the polyline. I know it's different in grasshopper, I just have to find a way to express that. Kind of like with any language, programming or not.
rats, forgot the sketch…
I like your solution.
Why don't you use a Brep Component (Explode) component to extract the corners of your flat box, instead of "Brep Wireframe - Join Curves - Explode - Shift List" ? Is it less "safe", less reliable ?
:)
When I started I just had a rectangle drawn in Rhino. But because of the Internalising issues I thought I should post something that didn't rely on anything in the document. So all I was thinking at the time was create a curve.
After I posted I did look at it and think I should change it but I ran out of time.
Try this. White groups are possible choices.
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by