Circle Center's Cartesian Coordinates
Date: 03/24/99 at 09:40:08 From: Andreu Cuartiella Subject: Finding the center of a circle with two points and radius The problem is to find the cartesian coordinates of a circle's centers knowing two points on its perimeter. I guess it will have two solutions. I've tried applying the general circle equation and/or right triangles, but the resulting formula is really huge. I'm looking for the easiest solution. Thank you very much for your help.
Date: 03/24/99 at 11:42:03 From: Doctor Rob Subject: Re: Finding the center of a circle with two points and radius Thanks for writing to Ask Dr. Math! Sorry, but the general solution is, in fact, rather complicated. If the equation is (x-h)^2 + (y-k)^2 = r^2 and the two points are (x1,y1) and (x2,y2), then you have two simultaneous equations in the two unknowns h and k: (x1-h)^2 + (y1-k)^2 = r^2, (x2-h)^2 + (y2-k)^2 = r^2. Now I would substitute H = h - x2, K = k - y2, X = x1 - x2, Y = y1 - y2, and let D^2 = X^2 + Y^2, so D is the distance between the two points. Then (X-H)^2 + (Y-K)^2 = r^2 H^2 + K^2 = r^2 Subtract the second from the first, and the quadratic terms in H and K will be removed: X^2 + Y^2 - 2*X*H - 2*Y*K = 0 D^2 = 2*X*H + 2*Y*K H = (D^2-2*Y*K)/(2*X) Now you substitute that into either of the quadratic equations above, and you will have one quadratic equation in the single unknown K: [(D^2-2*Y*K)/(2*X)]^2 + K^2 = r^2 (D^2-2*Y*K)^2 + 4*X^2*K^2 = 4*X^2*r^2 D^2*(2*K-Y)^2 = X^2*(4*r^2-D^2) 2*K - Y = +-X*sqrt(4*r^2/D^2-1) K = [Y+-X*sqrt(4*r^2/D^2-1)]/2 You have the two values of K for the two possible centers. Putting that back into the formula for H, you get the corresponding values of H. H = (X^2-Y*[2*K-Y])/(2*X) = [X-+Y*sqrt(4*r^2/D^2-1)]/2 Now you can substitute their equals for H, K, X, Y, and D, and you will have the formulae in terms of the original data for h and k. If 2*r < D, and the diameter of the circle is less than the distance between the points, then the values of H and K are not real, for obvious geometric reasons. If 2*r = D, the center is (h,k) = ([x1+x2]/2,[y1+y2]/2), the midpoint between the two given points. If 2*r > D, there are two real solutions. Sorry that the results are complicated! Of course, when numerical values are used, this method is not so messy. - Doctor Rob, The Math Forum http://mathforum.org/dr.math/
Search the Dr. Math Library:
Ask Dr. MathTM
© 1994-2013 The Math Forum