# Calculate the $N$ "projection" of a point every $2\pi/N$

So, I'm trying to figure out those coordinates, for the last 2 hours.

I have a point $$x$$ and $$y$$ on the cartesian plane, and i want the $$N$$ other points that are the "projection" of the first point every $$2\pi / N$$.

Example.

Let's say i have $$[x,y] = [1,0]$$ and $$N = 5$$, the 5 points that i'm interested in are the vertices of the pentagon with "the tip" on $$[1,0]$$, so I suppose in this case it should be:

$$\text{points} = [\cos( (2 p\pi / N)p k), \sin( (2 \pi / N) k)]$$

but I need of a "general" formula.

• These points like on an argand diagram with position$$(x+iy)e^{i 2\pi k/n}\qquad k=0,1,\dots,n-1$$Calculate the real and imaginary parts of this number to get the required position. Aug 21, 2020 at 21:17
• @PeterForeman thank you... are there more "real" solutions? Aug 21, 2020 at 21:18
• I suppose you could also just use a real rotation matrix with the given angle on the position vector $(x,y)^T$. Aug 21, 2020 at 21:19

\begin{align} x_k &= \cos\left(\frac{2\pi}{n} k\right) x_0 - \sin\left(\frac{2\pi}{n} k\right) y_0 \\ y_k &= \sin\left(\frac{2\pi}{n} k\right) x_0 + \cos\left(\frac{2\pi}{n} k\right)y_0 \end{align} where $$(x_0, y_0)$$ is your starting point, I've used $$n$$ instead of $$N$$, and $$(x_k, y_k)$$ are the coordinates of the $$k-$$th point, so you'll need to plug in $$k = 1, 2, 3, \ldots, n-1$$.
This won't work if $$(x_0, y_0) = (0, 0)$$ ... or it will work, but all $$n$$ points that you get will be at the origin, so it won't be interesting.