I want to know if there is any general formula to find out vertices (co-ordinates) of a polygon (3 or more equal sides) when following is given:
Co-ordinates of one of the vertices
Center point (distance between each vertex and center point is equal)
For example, what would be A and B vertices of following equilateral triangle:
(For equilateral triangle i assume that center point = centroid)
A
/\
/ \ Center point = (2, 5)
/____\
B C (4, 6)
Thanks for help.
Regards
Best Answer
If you have a polygon with equal sides and equal distance from center to all vertices it seems to be a regular convex polygon
EDIT I've found much easier way.
Assume that center of the polygon has coordinates
(x_0,y_0)
and known vertice has coordinates(x_n,y_n)
. Also assume that we are considering n-sided polygon.Coordinates of i-th vertce (
0<i<n
) can be calculated using this formulaewhere
According to your example computations using formula above shows that
You can check (e.g. using this calculator) that distances between
A
andB
,B
andC
,C
andA
are the same and equal to3.8729833462074166
. Also yu can calculate distance between center and each vertice and see that they all will be the same.==================
That means you can find length of the side of such polygon using this formula
a=2Rsin(Pi/n)
, whereR
is a distance between centerc
of your poly and its known verticep
.So you will have a triangle based on center
c
of your poly and its firstp
and seconds
vertices. Since you know coordinates ofc
andp
and length of all sides of this triangle (distance betweenc
andp
isR
, distance betweenp
ands
isa
and distance betweens
andc
is againR
) you can determine coordinates ofs
.