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 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
.
Suppose we have centroid $M = (x_0,\ y_0)$ and vertex $A=(x_1,\ y_1)$.
First let us center the triangle at the origin with shifted vertex $$A' = (x_1',\ y_1') = (x_1 - x_0,\ y_1 - y_0)$$
The other vertices will be reached from this one by a rotation about the origin $120^\circ$ clockwise and counter-clockwise. The counter-clockwise rotation matrix is
$$R_{120^\circ} = \begin{pmatrix}\cos120^\circ & -\sin120^\circ \\ \sin120^\circ & \cos120^\circ\end{pmatrix} = \begin{pmatrix}-\frac{1}{2} & -\frac{\sqrt{3}}{2} \\ \frac{\sqrt{3}}{2} & -\frac{1}{2}\end{pmatrix}$$
with the clockwise rotation matrix as
$$R_{-120^\circ} = \begin{pmatrix}\cos120^\circ & \sin120^\circ \\ -\sin120^\circ & \cos120^\circ\end{pmatrix} = \begin{pmatrix}-\frac{1}{2} & \frac{\sqrt{3}}{2} \\ -\frac{\sqrt{3}}{2} & -\frac{1}{2}\end{pmatrix}$$
Your vertices are then
$$B' = \begin{pmatrix}-\frac{1}{2} & -\frac{\sqrt{3}}{2} \\ \frac{\sqrt{3}}{2} & -\frac{1}{2}\end{pmatrix}\begin{pmatrix}x_1' \\ y_1'\end{pmatrix}=\begin{pmatrix}-\frac{1}{2}x_1' - \frac{\sqrt{3}}{2}y_1' \\ \frac{\sqrt{3}}{2}x_1' - \frac{1}{2}y_1'\end{pmatrix}$$
$$C' = \begin{pmatrix}-\frac{1}{2} & \frac{\sqrt{3}}{2} \\ -\frac{\sqrt{3}}{2} & -\frac{1}{2}\end{pmatrix}\begin{pmatrix}x_1' \\ y_1'\end{pmatrix}=\begin{pmatrix}-\frac{1}{2}x_1' + \frac{\sqrt{3}}{2}y_1' \\ -\frac{\sqrt{3}}{2}x_1' - \frac{1}{2}y_1'\end{pmatrix}$$
Adding $M$ to each coordinate shifts back the triangle to the original spot.
Best Answer
Let's assume that $x$, the side of the equilateral triangle, is a known positive quantity and that side $BC$ is horizontal (or that point $A$ is directly above point $M$). Let's also assume you are using Cartesian coordinates (where increasing the first coordinate means moving right and increasing the second coordinate means moving up) and that $M$ is the point $(50,50)$.
Then $x$ is the side of the equilateral triangle $ABC$. By simple geometry we know that the altitude is $\frac{\sqrt 3}2x$. Point $M$ is the centroid of the triangle and is on the altitude which is also the median. This means the distance $AM$ is two-thirds the altitude, namely $\frac{\sqrt 3}3x$.
Therefore point $A$ is $\left( 50,50+\frac{\sqrt 3}3x \right)$.
Point $B$ is $\frac{\sqrt 3}2x$ down from $A$ and $\frac x2$ to the left, so point $B$ is $\left( 50-\frac x2,50-\frac{\sqrt 3}6x \right)$, and point $C$ is $\left( 50+\frac x2,50-\frac{\sqrt 3}6x \right)$.
I tested this answer with Geogebra, and it checks.