[Math] Calculate equally-spaced and arranged center points on the edges of a circle based on its diameter and grid origin

analytic geometrygeometry

Question for a project:
I have a circle that I know the diameter of (and therefore also the height/width dimensions of on a grid based on its top/left origin X/Y)… but I wanted to calculate equally spaced X/Y points along its edge based on a divisor that's >= 2.

So, for example… here's what I imagine some outputs would be (the center points of the blue dots, which are oversized for ease of visibility):

example of dot arrangement

… The points, I would assume are equally spaced by a percentage of the circumference total, but converting this to points on the X/Y grid that the circle is drawn on introduces some complexity in figuring this out. Also, trying to calculate the ideal rotational "start" position of the dots to create the visually appealing arrangements demonstrated also introduces some complexity.

I'm sure this can be done, but I'm not sure where to start. Any chance anyone has a clever solution to something like this?

Best Answer

For placing $n$ dots they are at angular intervals of $\frac {2\pi}n$ Finding an appealing starting point is not a mathematical problem. To get the $x$ and $y$ offsets from the center, you have $x=r \cos \theta, y=r \sin \theta$ if the first point is at $\theta=0$, which in normal math is toward the right.

Related Question