Calculating the coordinates of two points of an equilateral triangle with one point

I need to calculate the coordinates of two corners of an equilateral triangle if I have the coordinates of the center, the coordinates of one corner point, and the distance from the center to a point. This is for a Java program I'm writing, and it's been a while since I did math like this. The numbers are going to be constantly changing (I need to write the code so these calculations can be done repeatedly), but for the purposes of an example, here are some sample numbers.

Center Point: (153, 144)

Corner Point: (240, 121)

Distance = 83.9

Re: Calculating the coordinates of two points of an equilateral triangle with one poi

Solution:

Given x=153

y=144

x1=240

y1=121

(x,y)=[x1+2/3(x2-x1),y1+2/3(y2-y1)]

(153,144)=[240+2/3(x2-240),121+2/3(y2-121)]

(x2,y2)=(109.5,155.5)

Re: Calculating the coordinates of two points of an equilateral triangle with one poi

Please clarify what you mean by "the distance from the center to a point" - what point are you referring to? I believe all you need to define the equilateral triangle is the coordinates of one corner plus the center. In the previous post brosnan123 shows how to calculate a point on the edge of the triangle directly opposite the known corner point. This edge point can then be used to calsulate the equation of that base line - it's slope is perpendicular to the line from the known corner to this edge point, so the equation of the base is straight-forward. Then the two corner points on that base line are the points that are distance sqrt(3)/2 times the distance from the known corner point to the center of the triangle.

1 Attachment(s)

Re: Calculating the coordinates of two points of an equilateral triangle with one poi

To continue from my previous post - using the example you gave the other corner points turn out to be (x2,y2)= (129.4,230.8) and (x3,y3)= (89.6, 80.2).

Attachment 28980