# x Points around a circle

I would like to calculate x number of points around a circle using the circle's radius/diameter.

For example, if I wanted 24 equidistant points around a circle with radius 30, how could I go about that?

The circle's origin is (0, 0), radius 30 and I need to calculate 24 (X, Y) equidistant points around it.

Example with 17 points: http://i.imgur.com/Jibwr.png

-
Can you clarify your question a bit? – Alexei Averchenko Nov 2 '12 at 12:03
Are the points equidistant? – Neal Nov 2 '12 at 12:07
Just updated it a little with a (maybe) better explanation? Not really sure what else I can add. Yes, preferably equidistant from eachother. – Mhmk Nov 2 '12 at 12:07
You want coordinates? – Alexei Averchenko Nov 2 '12 at 12:13
Yes, coordinates. – Mhmk Nov 2 '12 at 12:14

If you start from the right wing of the $x$ axis, your points of the regular $n$-gon are $$P_k=(r\cos\left(\frac{k\cdot 2\pi}{n}\right), r\sin\left(\frac{k\cdot 2\pi}{n}\right))$$ where $k=0,..,n-1$.

If the first angle, measured from the right wing of $x$ axis, counterclockwise, is not $0$ but some $\alpha_0$, then $$P_k=(r\cos\left(\frac{k\cdot 2\pi}{n}+\alpha_0\right), r\sin\left(\frac{k\cdot 2\pi}{n}+\alpha_0\right))$$

-
This seems plausible! Where was the 2 * (Pi) from and also what would n be equal to? My Math is... Limited. – Mhmk Nov 2 '12 at 12:15
@Mhmk Welcome to MSE! $2\pi$ is in radians, which is equal to $360$ degrees. $n$ is the number of points on the circle, as in $n$-gon. And, you may learn to format your questions/answers/comments in $\LaTeX$, so that they are more readable. – FrenzY DT. Nov 2 '12 at 12:19
Thanks @FrenzYDT.! That clears a lot up. – Mhmk Nov 2 '12 at 12:24

First of all, observe that multiplication of coordinates preserves equality of distances: if points $a$ and $b$ are equidistant, then so are $\alpha a$ and $\alpha b$ for any number $\alpha$. Thus, we can reduce the problem to the case when the radius of the circle is equal to one.

Now, consider a function $f(\cos \varphi, \sin \varphi) = (\cos(n\varphi), \sin(n\varphi))$. As you can see, it wraps the circle around itself $n$ times, and $$\left|\frac{\mathrm{d}}{\mathrm{d}\varphi}f\right| = \left|(-n\sin(n\varphi), n\cos(n\varphi))\right| = \sqrt{n^2\sin(n\varphi)^2 + n^2\cos(n\varphi)^2} = n \sqrt{\sin(n\varphi)^2 + \cos(n\varphi)^2} = n,$$ so as $f$ wraps a circle around itself, it does so with constant velocity, so each 'lap' has the same length. Thus, for example, all points that $f$ maps to $(\cos \varphi_0, \sin \varphi_0)$ must be equidistant, and there are exactly $n$ of them.

So now all that's left for you to do is to solve the equation $f(\cos \varphi, \sin \varphi) = (\cos \varphi_0, \sin \varphi_0)$, and you'll arrive to Berci's answer.

One last thing, if you're familiar with complex numbers, $f(z) = z^n$, so any set of $n$ equidistant points on a unit circle is a set of $n$-th roots of some number of length one.

-
Thanks. That also greatly helped explanations of how to do it. I would upvote, although I need 15 reputation apparently. – Mhmk Nov 2 '12 at 12:38
No problem :) ${}$ – Alexei Averchenko Nov 2 '12 at 12:44