# Algorithm for placing circles of Diameter d around the edge of another circle with diameter D [closed]

Hi i'm struggling with what i think may be simple maths. I need to place circles of a small size around the edge of larger circle.. is there an algorithm to calculate the angle for each small circle from the x-axis, counter clockwise? then using this angle i can find the Cartesian coordinates (x,y) of the enter of each circle.

• I'm voting to close this question as off-topic because it is about elementary trigonometry, not computer science. – David Richerby Aug 9 '19 at 14:55

Circles centers form isosceles triangle with base of length $$2r$$ and arms of length $$R+r$$, so $$\tan (\frac{\beta}{2}) = \frac { r}{ r+R}$$ hance $$\beta = 2\arctan(\frac{r}{r+R})$$