Finding the Center of a Circle from 2 Points and Radius
Date: 01/24/97 at 21:15:10 From: Sherri McClung Subject: Find center of circle Please help me find a formula to obtain the center coordinates of a circle if I know two points on the circle and its radius. (There should be two solutions) Thank you!
Date: 01/26/97 at 16:06:22 From: Doctor Mitteldorf Subject: Re: Find center of circle Dear Sherri, Whenever I'm faced with a problem like this, I try to go back to the definitions and see how they help. If I'm looking for the center of a circle of radius r, then I'm looking for a point a distance r away. The distance between (x1, y1) and (x, y) is given by Pythagoras: sqrt((x-x1)^2 + (y-y1)^2) Let's think of (x1, y1) and (x2, y2) as our two circle points, and let (x, y) be the point we're looking for. Then this is the equation that says the distance from the first point is r: (x-x1)^2 + (y-y1)^2 = r^2 This is the equation that says the distance from the second point is r: (x-x2)^2 + (y-y2)^2 = r^2 I wrote them with both sides squared because I thought it might be easier to work with the two equations if they didn't have the square roots in them. The next step is to combine these two equations algebraically and make an equation for x and an equation for y out of them. Usually, a surefire approach would be to solve one equation for y, and then substitute the expression you get wherever you see a y in the other equation. I'm pretty sure that will work, but you'll be doing a lot of algebraic manipulation with square roots. So here's another idea for solving the problem. It should lead to the same answer and the algebra will be less tedious. This method, however, uses some fancy ideas from "vector theory", which are probably strange and unfamiliar to you. Think of the geometry. You know that for any two points there's a "mirror line" that goes halfway between them. Technically, the line consists of the locus of all points that are equidistant from your two circle points; you can think of the line as a mirror where each of your two points appears as a reflection of the other. Well, this line will help us a lot in constructing our center, because we know that the center is on the line AND because we can use Pythagoras to tell us where on the line the point is. Here's how we can do all that with algebra. First, find the distance between points 1 and 2. We'll call that q, and it's given by sqrt((x2-x1)^2 + (y2-y1)^2). Second, find the point halfway between your two points. We'll call it (x3, y3). x3 = (x1+x2)/2 and y3 = (y1+y2)/2. Now find the direction of the line between point 1 and point 2. That direction is (x1-x2, y1-y2). What we really want to know is the direction of the mirror line, which is perpendicular to the line between point 1 and point 2. Here's a crucial trick: you can find the direction of a perpendicular to a line just by swapping x with y and changing the sign of one. In other words, if the direction of the joining line was (x1-x2, y1-y2) then the direction of the mirror line is (y1-y2,x2-x1). It will be helpful to "normalize" our direction which means to make the length of the line equal to 1. You do this just by dividing both the (y1-y2) and the (x2-x1) by q. The two circle centers will both be on the mirror line, and we can use geometry to find how far they are from the point (x3,y3): First notice that the distance from point (x3,y3) to either point 1 or point 2 is just half of q. Then the distance to move along the mirror line is: sqrt(r^2-(q/2)^2) Move up the mirror line by adding a multiple of the direction line to the point (x3,y3) or move down the mirror line by subtracting the same multiple. One answer will be: x = x3 + sqrt(r^2-(q/2)^2)*(y1-y2)/q y = y3 + sqrt(r^2-(q/2)^2)*(x2-x1)/q The other will be: x = x3 - sqrt(r^2-(q/2)^2)*(y1-y2)/q y = y3 - sqrt(r^2-(q/2)^2)*(x2-x1)/q As I write this, I realize how complicated the ideas in vector theory can be, and I don't expect you'll be able to follow this. If you're interested enough to devote some time to it, ask a math teacher for help. Or make a start with it, get as far as you can, and write back to Dr Math if you get stuck. -Doctor Mitteldorf, The Math Forum Check out our web site!
Search the Dr. Math Library:
Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.