Re: Calculate third point of a triangle, given two points

From: Stan Brown (the_stan_brown_at_fastmail.fm)
Date: 11/05/04


Date: Fri, 5 Nov 2004 15:32:44 -0500


"Philbo" <philbo@gmail.com> wrote in sci.math:
>In an equilateral triangle ABC, I've the the coordinates of two of the
>points (A and B).
>
>Is it possible to calculate the coordinates of the third (C)?

Yes, in a sense. You can calculate the two possible points that
could be the third point of the equilateral triangle. For instance,
if the two points are at (0,8) and (0,-8) then the third point could
be at either (8*sqrt(3),0) or (-8*sqrt(3),0).

> I've
>tried using pythagoras's theorem but this only seems to work when one
>of the triangle sides are parallel to an axis.

Why? Though the calculation is certainly easier in that situation, I
see no reason it should be impossible otherwise.

METHOD 1: Compute the distance between the two points
        r = sqrt( (x2-x1)^2 + (y2-y1)^2 )
The two possible third points of the triangle are at the two
intersection points of circles centered on the two points and with
radius equal to the r:

(x-x1)^2 + (y-y1)^2 = r^2 and (x-x2)^2 + (y-y2)^2 = r^2.

METHOD 2: The third point must be on the perpendicular bisector of
the line connecting the first two points. The midpoint of that line
is ( (x1+x2)/2, (y1+y2)/2 ). Its slope is (y2-y1)/(x2-x1) and
therefore the slope of the perpendicular bisector is
        m = -(x2-x1)/(y2-y1)
You need the two points on that perpendicular bisector that are
distant from the midpoint by sqrt(3) times the distant from the
midpoint to either of the two given points.

Either method should work for any two points, whether or not a side
of the triangle is on an axis or even parallel to one.

-- 
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
                                  http://OakRoadSystems.com/
"And if you're afraid of butter, which many people are nowa-
days, (long pause) you just put in cream."     --Julia Child

Quantcast