1
$\begingroup$

I want to draw, say, 8 smaller circles that are adjacent to the big circle the edge of a big circle, similar to this picture. enter image description here

I know the center coordinates of the bigger circle $(A, B)$, its radius $(R)$,radius of the smaller circles $(r)$, and the number of circles I want to draw $(n)$.

My question is very similar to the one discussed there, with one exception. I want a formula that calculates center coordinates of circles adjacent, not those on the edge of a bigger circle. Mathematics is not my strongest side (to say the least), so I'd greatly appreciate any help. Thank you!

$\endgroup$
  • $\begingroup$ I think $n$ determines $r$, so for example if you want $6$ externally tangent circles then $r$ is fixed at $r=R$ (all $7$ circles are the same size in that special case). In general, you could write $r$ as a function of $n$ and it would be strictly decreasing. $\endgroup$ – Zubin Mukerjee Jan 14 at 20:13
  • $\begingroup$ I mention that because you cannot presuppose $n$ and $r$ - most pairs that you choose will lead to impossible situations. Just presuppose $n$ and $R$ and those will together determine $r$. $\endgroup$ – Zubin Mukerjee Jan 14 at 20:14
  • $\begingroup$ Thank you, that makes sense (in lay terminology, only certain amount of circles of size will fit, correct?) $\endgroup$ – Anton Leontyev Jan 14 at 20:16
  • $\begingroup$ Connect the centers of the $n$ externally tangent circles and you will have a regular $n$-gon $\endgroup$ – Zubin Mukerjee Jan 14 at 20:16
  • $\begingroup$ If you choose the number of small circles and the size of the big circle, the size of the small circles is fixed, invariable, set, locked. $\endgroup$ – Zubin Mukerjee Jan 14 at 20:17
1
$\begingroup$

For the 'adjacent' circles use : $\delta = 360/n$ where $n$ is the number of circles you want. Then the centers are $c_i = ((R+r)\cos i\delta + \phi, (R+r)\sin i\delta + \phi)$, where $i=0,1,...,n-1$ and $\phi$ is some offset rotation. Note that the small circles will not necessarily touch, but they will touch the large circle.

Edit: Here's a shadertoy example: https://www.shadertoy.com/view/wsfGWj

$\endgroup$
  • $\begingroup$ I just edited it, realized I had already divided by $n$, so check the corrected version. @AntonLeontyev $\endgroup$ – lightxbulb Jan 14 at 20:25
  • $\begingroup$ Could you please clarify what do you mean by "offset rotation"? Thank you! $\endgroup$ – Anton Leontyev Jan 14 at 20:29
  • $\begingroup$ @AntonLeontyev check the shadertoy example I gave, the offset is literally what rotates the circles around. $\endgroup$ – lightxbulb Jan 14 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.