Need some help with Polar Array geometry

If @akilli’s solution works I’ve just wasted a lot of effort :slight_smile:
Ok, my scanner is broken so I’ll just have to talk my way through this.

We have the following setup; A big circle with radius R which is the value we’re trying to find. We have N small circles of radius r (which we know) distributed equidistantly along the big circle. Furthermore we want the smallest distance between adjacent small circles to be exactly s, measured on a line connecting their centre-points.

Since the problem is fully symmetrical, we only have to look at 2 adjacent small circles (let’s call them C_0 and C_1, and let’s call their respective centre-points m_0 and m_1, m for “middle”). We can express the distance d between m_0 and m_1 as straight up Pythagoras: d = \sqrt{(m_{1x} - m_{0x})^2 + (m_{1y} - m_{0y})^2}.

So what are the actual coordinates of m_0 and m_1? Well, we can make our lives easier by just pushing m_0 as far towards the right as it will go, putting it at (R,0). Here we are assuming that the big circle is centred on the world origin (0,0). Since N is a given, we also know the coordinates of the first counter-clockwise neighbour C_1. That’s just straight up trig: (R \cdot cos(\alpha), R \cdot sin(\alpha)), where \alpha is the angle between adjacent small circles.

So now we can write d fully in terms of R and N, since \alpha is just \frac{2\pi}{N}. Two times \pi being a full circle, divided equally into N segments. This gives us the lovely equation d = \sqrt{(R - R \cdot cos(\alpha))^2 + (R \cdot sin(\alpha))^2}.

One last piece of the puzzle before we pull the whole thing inside out so we end up with the equation we need. The gap between adjacent circles, is just the distance d between the centre-points minus twice the radius. Right? If we start at m_0 and travel in a straight line to m_1 we first travel inside C_0 for r units, then we cross the gap, and finally we travel inside C_1 also for r units. Thus, d = s + 2r.

We can now combine these two equations so that the whole thing is written as an equality for s:

s = \sqrt{(R - R \cdot cos(\alpha))^2 + (R \cdot sin(\alpha))^2} - 2r

So far so good. It’s not exactly pretty, but it doesn’t go beyond high-school maths either. The big problem of course is that we know s but we don’t know R. So instead of s = something\hspace{1mm}R we need to have an equation that looks like R = something\hspace{1mm}s. This is known as “solve for R” and it’s the difficult bit. Luckily we live in an age of wolframalpha and we can outsource that part of the problem.

WA thinks that we can rewrite the equation into: R = \frac{2r+s}{\sqrt{sin(\alpha)^2 + cos(\alpha)^2 - 2 cos(\alpha) + 1}}

NOTE: wolframalpha yielded a correct but needlessly complicated answer, see posts below.

Putting that into Grasshopper yields the following: roller spacing.gh (13 KB)

2 Likes