# Simple analytic geometry - calculate the point coordinates

I have the coordinates from A and B and the distance d. How can I calculate the point C?

If the triangle wasn't tilted, it'd be peace of cake. Actually, why is it easier if the triangle isn't tilted? (Don't worry about this question though)

I can calculate the angle α via atan from radius / dist(a, center(a, b)). This doesn't help me much in this case though. I have been trying drawing more triangles like this, but I don't know how to calculate β, so that I can get the distances i and j, and this way calculate C.

Where did I go wrong? Thanks!

-
You can calculate $\alpha+\beta$ from the known vector $\vec{AB}$. Like $$\tan(\alpha+\beta)=\frac{y(B)-y(A)}{x(B)-x(A)}.$$ Alternatively you may choose not to calculate any angles at all: Find the midpoint $D$ of $AB$, and use the fact that the slope of the line $DC$ is the negative reciprocal of the slope of the line $AB$. –  Jyrki Lahtonen Jul 5 '11 at 10:44

The notation of the diagram could be improved. We really cannot call the points $A(x,y)$ and $B(x,y)$, since their coordinates are different.

Before you try for a "general" procedure, let's work out the details for a specific choice of $A$ and $B$, say $A(1,2)$ and $B(7,10)$.

Then the midpoint $M$ of the line segment $AB$ has coordinates $(\frac{1+7}{2}, \frac{7+10}{2})=(4,6)$. I cheated a bit to make the numbers nice.

The line $AB$ has slope $8/6$. So the line $MC$ has slope the negative reciprocal of $8/6$, which is $-6/8$, by perpendicularity.

Now you can find the equation of the line $MC$. The usual method gives that this equation is $$\frac{y-6}{x-4}=-\frac{6}{8}.$$

The equation can be rewritten in various ways, like $y=(-3/4)x+9$. Now for a specific $d$, (pick one, like $d=8$) you want the distance from $M(4,6)$ to the point $(x, (-3/4)x+9)$ on the line to be $d$. Use the "square of distance" formula, also known as the Pythagorean Theorem. You will get a quadratic equation in $x$.

Solve. There will be in general two solutions, as your picture makes clear.

Now if you really want to develop a general formula, give general names to the coordinates of $A$ and of $B$, and use exactly the same procedure. Things will look fairly messy, because of all the symbols running around, but in principle you are doing nothing really different from what we did in the specific numerical case.

Later, when you learn about vectors, there will be a cleaner-looking way of handling the problem.

Added: I had initially dismissed as not very practical the notion of using angles. Though the method described above is easier, the idea of your first diagram can be used to produce an answer. Since we know $d$ and can easily find half the distance between $A$ and $B$, we can compute $\tan\alpha$. We can also compute the tangent of the angle between $AB$ and the vertical line through $A$, and so we can find the slope, and then the equation, of $AC$. We also know the equation of what I called the line MC$. Now we have two linear equations, and can find where the two lines meet. - Since you have points A and B, you can find the midpoint of AB and call it D. You also know the length of DC, and that AC = BC. Using the distance formula along with this information, you can set up a system of equations to find the coordinates of C. - It looks from your picture that the segments$AC$and$BC$are required to have the same length. If so, the distance$d$is taken along the axis$\ell$of the segment$AB$. Thus you can compute the distance$r$between, say,$A$and$C$by using Pythagora's theorem. Now$C$is simply one of the two points of${\cal C}\cap\ell$where$\cal C$is the circle centered in$A$of radius$r$. Alternatively, you can get$C$as the intersection between$\ell$and the circle centered in the mid-point of$AB$of radius$d\$.

-