0
$\begingroup$

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

  • 0
    The problem's underdetermined. At the very least, you want to be able to form the isosceles triangle that comprises a "slice" of the regular polygon you want, and just two pieces of information isn't enough to uniquely determine that triangle.2011-04-27

1 Answers 1

4

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) can be calculated using this formulae

x_i = x_0+R*cos(a+2*Pi*i/n) y_i = y_0+R*sin(a+2*Pi*i/n) 

where

     _______________________ R = v(x_n-x_0)^2+(y_n-y_0)^2 a = acos((x_n-x_0)/R) 

According to your example computations using formula above shows that

A=(4, 6) B=(0.1339745962155614, 6.2320508075688776) C=(1.8660254037844377, 2.7679491924311228) 

You can check (e.g. using this calculator) that distances between A and B, B and C, C and A are the same and equal to 3.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), where R is a distance between center c of your poly and its known vertice p.

   _____________________________ R=v(c.x - p.x)^2 + (c.y - p.y)^2 

So you will have a triangle based on center c of your poly and its first p and second s vertices. Since you know coordinates of c and p and length of all sides of this triangle (distance between c and p is R, distance between p and s is a and distance between s and c is again R) you can determine coordinates of s.

  • 0
    Thanks$a$lot for help @Konstantin Mikhaylov and @Ross Millikan. I used atan2 to find a. Thanks again. Regards2011-04-27