# How to get Point between two points at any specific distance?

I have two points, approximately we take values for that:

Point $A = (50, 150)$; Point $B = (150, 50)$;

So the distance should be calculated here, $\text{distance} = \sqrt{(B_x - A_x)(B_x - A_x) + (B_y - A_y)(B_y - A_y)}$;

Now I want any one poins which is far from Second point B at specific distance (Example, 10).

            B(x,y)
/
/
C(x,y)
/
/
/
/
/
/
A(x,y)


Point c on Line Segment and its specific distance from point B(Ex, 10)..

Which formula would be better to calculate C point here ?

-
thanks Gigili, hey how could write this Sqrt in mathematics looks, let know also these types of tools, plz.. – Jagdish Jun 8 '12 at 8:05
I think he wants the 2nd component to be 10. – copper.hat Jun 8 '12 at 8:09
Point c on Line Segment and its specific distance from point B.. let me update question.. Thanks.. – Jagdish Jun 8 '12 at 8:09
Its specific distance from second Point B, for an example it may be 10. – Jagdish Jun 8 '12 at 9:09
Ohh god, 10 is not a distance of the two points, i write 10 only for example, that 10 is the distance of point C from point B. – Jagdish Jun 8 '12 at 9:34

This what I come up with:

Find $(x_0,y_0)$ so that $10 = \sqrt{(50 - y_0)^2 + (150 - x_0)^2}$ and $(x_0,y_0)$ also lies on the line $y = 200 - x$.

Since $(x_0,y_0)$ lies on that line, we can write $y_0 = 200 - x_0$, so the distance formula becomes:

$10 = \sqrt{(-150 + x_0)^2 + (150 - x_0)^2} = \pm\sqrt{2}(x_0 - 150)$

Thus $x_0 = 150 \pm \frac{10}{\sqrt{2}}$, leading to:

$y_0 = 50 \mp \frac{10}{\sqrt{2}}$

-
What's $(x_0, y_0)$ ? – Jagdish Jun 8 '12 at 9:35
The x and y coordinates of the point "C" you're looking for. – David Wheeler Jun 8 '12 at 9:35
Thanks, David.... – Jagdish Jun 8 '12 at 9:56

I hope I have understood your question.

The general form of the line is $\lambda A + (1-\lambda) B$. You wish to find $\lambda$ so that the $y$-component is $10$.

Expanding gives: $\lambda A + (1-\lambda) B = (150-100 \lambda, 50+100 \lambda)$. Equating the $2$nd component to $10$ and solving for $\lambda$ gives $\lambda = -0.4$, from which we get the point $(190,10)$.

I think I misunderstood your question. If you wish to find points on the line at a specific distance $\delta$ from $B$, then you need to find the $\lambda$ that satisfies $||\lambda A + (1-\lambda) B -B || = |\lambda|\,||A-B|| = \delta$. Specifically, this gives $\lambda = \pm \frac{\delta}{||A-B||}$.

In this case, you have $\delta = 10$, and $||A-B|| = 100 \sqrt{2}$, so $\lambda = \pm \frac{1}{10\sqrt{2}}$. Substituting the positive value (which corresponds to the point between $A$ and $B$) in gives:

$$\lambda A + (1-\lambda) B = (150-\frac{10}{\sqrt{2}}, 50+\frac{10}{\sqrt{2}}).$$

The general formula for a point $\delta$ away from $B$ will be, of course:

$$(x,y) = (150\pm\frac{\delta}{\sqrt{2}}, 50 \mp\frac{\delta}{\sqrt{2}}).$$

-
So (110, 10) point will be "C" right ? – Jagdish Jun 8 '12 at 9:25
That point does not lie on the line connecting A and B. – David Wheeler Jun 8 '12 at 9:33
It is on the line through $A$ and $B$. If the y-component is $10$, there is little choice here. – copper.hat Jun 8 '12 at 15:13
The line through $A$ and $B$ has equation $y=200-x$. The point $(110,10)$ clearly fails to satisfy this equation. You should have $150-100(-0.4)=150+40=190$. Also, I believe that the OP wishes a point between $A,B$ having a specified distance from $B$--for example, $10$. The OP's abbreviation "(Ex., $10$)" is perhaps the cause of confusion. – Cameron Buie Jun 8 '12 at 16:00
It was an arithmetic error. I used $+0.4$ by mistake. I have fixed it. – copper.hat Jun 8 '12 at 16:02