# Distance from center of circle to outline circle with segments

I'm trying to solve the following equation:

I have $X$ amount of segments, each equally $X$ wide.

How do I calculate the distance each segment needs to be from the center of a circle to form a closed circular shape without any overlap between the segments.

I've drawn up an example of what I'm looking for. The sample shows $8$ segments that are each $40$ pixels wide. The formula I'm looking for allows for a variable amount of segments and width.

I'm a developer, not a mathematician so forgive me if this question is not appropriate for this platform.

1. Draw radii from the center to the vertices (places of segment intersection) and you get $n$ triangles, each with central angle of $2\pi/n$. Look at any such triangle, it is isosceles (why?), hence the base angles are of equal measure. So each angle is $\pi/2 - \pi/n$ (why?)
2. Use the Law of Sines to deduce the length of the radius $r$ -- you should get $$\frac{\sin (2\pi/n)}{x} = \frac{\sin(\pi/2-\pi/n)}{r}$$
3. Now that $r$ is known, your marked segment is a median, bisector and height and hence cuts the triangle into 2 equal right-angled subtriangles -- can you find the angles of such a subtriangle, and then the needed distance?