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
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
AandB,BandC,CandAare 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), whereRis a distance between centercof your poly and its known verticep.So you will have a triangle based on center
cof your poly and its firstpand secondsvertices. Since you know coordinates ofcandpand length of all sides of this triangle (distance betweencandpisR, distance betweenpandsisaand distance betweensandcis againR) you can determine coordinates ofs.