You need to add Pi/2-Pi/n
k[n_] := Pi/2 - Pi/n; f[n_] := Line[ Table[50 {Cos[(2 i ) Pi/n + k[n]] ,Sin[(2 i) Pi/n + k[n]]}, {i,0,n}]]; GraphicsGrid@Partition [Graphics /@ Table[f[i], {i, 3, 8}], 3]

Edit
In response to your comment, I will explain how I came to the formula. Take a look at the following image:

As you can see, we want the midpoint of the side aligned with Pi / 2. So ... what is ? ? It is obvious
2? = 2 Pi / n (one side) β? = Pi / n
Edit 2
If you want the bottom side aligned with the x axis, add 3 Pi/2- Pi/n instead ...

source share