calculate the correct space between dots on a dashed circle, to have a perfect alignment

137 Views Asked by At

I want to draw a dashed circle, with a diameter D, and X dots composing the circle, like on this image: dashed circle

How can I define the exact space I should have between the different dots, to avoid the misalignment you can see on the right of the circle? I think that an equation involving D, X, and Pi should work, but I do not find the solution...

Many thanks!

2

There are 2 best solutions below

0
On BEST ANSWER

If you want $X$ dots the angle between two successive dots is $\alpha=2\pi/X$ and the distance between them, measured as an arc on the circle, is $D \alpha/2$.

All this come form the fact that $c=2 \pi r$.

0
On

You want the dots to be at the ends of radii (length $R=D/2$) at angles $360/X$ degrees. The coordinates will be $$ \left(R\cos\left(j \frac{360}{X}\right), R\sin\left(j \frac{360}{X}\right)\right) $$ for $j = 0, 1, \ldots , X-1$.