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$.


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.

  • $\begingroup$ 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. $\endgroup$ Aug 21, 2020 at 21:17
  • $\begingroup$ @PeterForeman thank you... are there more "real" solutions? $\endgroup$ Aug 21, 2020 at 21:18
  • $\begingroup$ I suppose you could also just use a real rotation matrix with the given angle on the position vector $(x,y)^T$. $\endgroup$ Aug 21, 2020 at 21:19

1 Answer 1


\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.

  • $\begingroup$ maaaaan is you mathematicians are ammmmmmaizing, thank you so much $\endgroup$ Aug 21, 2020 at 21:30
  • 1
    $\begingroup$ Glad to be of some help. $\endgroup$ Aug 21, 2020 at 21:32

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.