Equally distributing objects in a closed space

Rhino 6 running on a Win7Prox64 machine.

I want to equally space N circles regularly within a closed triangle. Is there a command or plug-in that will do that? I have RhinoCAM 2018 and I tried using “NEST” but that wants to crowd all the circles into one area of the triangle, which makes sense as that leaves the most unused space in the material for a future project. Adjusting the circle to circle spacing as well as the circle to boundary spacing in NEST didn’t give me what I was looking for.

I can set the circles to the points of an equilateral triangle and then do linear arrays in the three different directions and get an equally spaced offset/not rectangular array, but if the triangle I’m trying to fill is not equilateral then there is empty space or circles overlapping the triangle along two of the sides (100, 40, 40 degrees, not 60,60,60).

I suppose something might be done in Grasshopper but the little bit of poking I’ve done at that makes it look like a tool that is far too powerful for me to use.

My expectation is that there is no easy way to do this, but I thought I should ask just in case there’s some obscure command I’ve never run across.


I’m changing the category to grasshopper for better visibility.


hi Michael. maybe this helps? it’s using the divide surface component to create equally spaced points inside the triangle and cull pattern to filter out those points that are on the edges (all points that don’t have a point in curve relationship of 1).

circles_triangle.gh (14.1 KB)

Thank you for taking the time to make the GH script, I’ll see what I can do with that.

What little programming I did was decades in the past and with BASIC and a dBase language variant and my math skills are pretty minimal. Grasshopper seems very complicated and loaded with, to me, obscure/arcane commands/concepts. It seemed likely it could be made to do something, but it was also pretty unlikely that I was going to be the person making it do that.


Also, thanks for the concept of dividing up the sides and placing the circles at the vertices of intersecting lines, I hadn’t though of doing it that way.