How to get example points of regular polygon having side length, and verticesamount

440 Views Asked by At

I want to find one set of coordinates for regular polygon of n-sides. I have given one vertice(0,0). And some given lenght of side L. I don't have other n - 1 vertices coordinates. I know there might be many possibilities, but I need just one.

2

There are 2 best solutions below

3
On BEST ANSWER

It's easy when the origin is the center. Then the vertices are the points $$ (L \cos j(2\pi/n), L \sin j(2\pi/n)) $$ for $j = 0, 1, \ldots, n-1$.

To move the vertex $(L,0)$ t0 the origin $(0,0)$ just subtract $L$ from all the $x$ coordinates.

If you knew about complex numbers you would know that the vertices of the centered polygon are the $n$th roots of unity, given by Euler's formula $$ Le^{j(2\pi/n)} . $$

3
On

You can do it using complex numbers.

suppose you need to find the coordinates of vertices of a n sided polygon.

First of all, you need to find the circumradius of the polygon which you can calculate easily by using cosine rule.

Suppose we get R as the circumradius,

Now

you have to just find out the roots of the following equation

$$ (z-c)^n= R $$

Since you have already provided a vertex in the question, just put the coordinate in the equation to find out $c$.