Voronoi between two concentric circles


(Waffle Man) #1

I was exploring Grasshopper some more (particularly the voronoi component), and was wondering if anyone had any suggestions for how one might go about creating voronoi between two concentric circles, with the cells all touching each other. The way I was suggested to go about it using a rectangular bounds was with the 3D voronoi component, and taking a cross section of that. However, I know that the 3D voronoi component is bounded by a box, so I was wondering how it would be done for concentric circles. Thanks!!

Voronoi attractor for non-box boundary
(David Rutten) #2

You can compute the voronoi shapes and afterwards cut them against circular boundaries. Would that work for you?

(Waffle Man) #3

So generate it within a rectangle, and then trim to fit within the circular bounds? I guess it probably could. The idea is to be able to use an attractor to cause certain areas to be composed of smaller pieces and other regions to be composed of larger pieces

(David Rutten) #4

You can distribute your points however you like. That’s step 1, the boundary cutting is step 2.
The region intersections are slow, but it works: voronoi custom boundary.gh (21.0 KB)

(Waffle Man) #5

Thanks a lot!! I’ll mess around with it and see

(Waffle Man) #6

So I recreated your definition on my own, and for some reason (even after I finally directly copied over each of your components), the definition fills the inner circle instead of the region between the two. Any idea why this could be? My definition should be identical to yours


Pottery Barn rule (“you break it, you own it”). :wink:

Why is your GH file 1 MB while David’s is only 21KB?

(Waffle Man) #8

Because it has other definitions inside.

(Laurent Delrieu) #9

The file has a GHX extension so it is text XML, not binary compressed GH file.
@aaronsmolar GHX are just useful if you want to look inside or debug after acrash. Not very effective in term of size.


(Waffle Man) #10

Yeah I heard about that on another thread I made. I already created this file, but next time, I will use .gh

(Laurent Delrieu) #11

You could also look at this thread, it is about copy about Julien Leonard work

(Michael Pryor) #12

Go to file > save as >.gh

(Waffle Man) #13

PrecedentStudy.gh (90.0 KB)

(Laurent Delrieu) #14

Elementary my dear Watson, you took the wrong component, use Region Difference instead of Region Intersection

(Waffle Man) #15

HAH I knew it was something stupid. Thanks so much!!

(Laurent Delrieu) #16

Sometimes it is tricky. Use the green button to follow the flow of the definition and to see the steps and see where is the problem.

(Waffle Man) #17

Thanks a lot! So that will step through and show the results for each component? I’m pretty new to Grasshopper, so I didn’t even know that existed

(Michael Pryor) #18

So that will step through and show the results for each component?

No. It will only preview any components you select. @laurent_delrieu is telling you to turn it on then select components one by one up stream and see what each one does.

(Waffle Man) #19

I think my problem is understanding what the graph mapping component usually does

(Michael Pryor) #20

It works like any graph does (you know the kind you learn in high school with one of these)

It takes your values and sets them along an axis. Where they hit the graph curve on the other axis is the value they are mapped to. In the case of the below image a value of .7 would become .35.