# Calculate the radius of a circle given…

I'm developing a mathematical formula for a programming interface. Please see following image for description:

As you will see in the diagram, I have variables that will be set by my software( a, d and x), but I need a function to calculate the radius of the big circle ( r ). I can't think of any solution and I don t really need an exact one, approximation will work (rounded up even better) if there isn't any solution.

Any help will be much appreciated.

-
Is the black circle supposed to pass through the center of each small circle? –  copper.hat Apr 16 '12 at 5:10
yes, the center of the small circles is for sure on the perimeter of the big circle. –  denislexic Apr 16 '12 at 5:30

$$x \cdot d \approx \frac{r \cdot \pi \cdot a}{180^{\circ}}$$

Hence :

$$r \approx \frac{x\cdot d \cdot 180^{\circ}}{a \cdot \pi}$$

-

Assuming that the big circle passes through the center of each small one, and each small circle just touches its neighbor, you can use:

$$r = \frac{\frac{d}{2}}{\sin(\frac{a}{2x})}$$

(Assuming the angle $a$ is in radians.)

To understand the formula, draw a radial line from the center of the big circle through the center of one of the small ones and another that just touches the top of the small circle. Draw a line from the touching point to the center of the small circle, this makes a right angle, the rest is basic trigonometry and division.

-
If computing $\sin$ is a big deal, you can approximate it for small values of $a$ by $\sin(\frac{a}{2x}) \approx \frac{a}{2x}$, to get $r \approx \frac{d x}{a}$, as @pedja has above (except with $a$ in degrees, not radians). –  copper.hat Apr 16 '12 at 5:30