x3=rx1+sx2/r+s
y3=ry1+sy2/r+s
This formula is correct. Here s = D1 and r = P1P2 - D1
Say we are given the Cartesian points P1=(x1, y1) and P2=(x2, y2) and we are given a distance D1. What equation do I use to find the coordinates of the point P3=(x3, y3) that lies along the line segment between P1 and P2, and is a distance D1 from point P1?
P1--------------P3----------------------P2
|------D1-----|
Here is what I know how to find:
We can find the slope of the line (m) with m = (y2-y1)/(x2-x1).
We can find the distance between the two points (d) using d=sqrt((x2-x1)^2 + (y2-y1)^2).
The y-intercept (b) using b = y1 - m*x1.
The equation of the line in slope/intercept form: y = m*x + b.
The equation of the line in point-slope form: y = m(x-x1) + y1.
Here is my best guess at the solution:
x3=rx1+sx2/r+s
y3=ry1+sy2/r+s
But I don't know if this is correct (or if there needs to be ( ) somewhere in it) and if it is correct, I don't know what r and s are supposed to stand for.
Please grace me with your vast knowledge, O' great Internets.
Hello dmw
First a quick rant on my part. If you're going to get proficient in mathematics, you must learn to say what you mean, and mean what you say. What you meant to say is:not:
which is what you (and sa-ri-ga-ma) wrote.
Even if you don't know how to use LaTeX (and there's lots of information on this web-site) there's no excuse for leaving out brackets. What you mean is:x3 = (rx1 + sx2)/(r + s), y3 = (ry1 + sy2)/(r + s)Next, which way round do the and go? The answer is that they 'flip' over.
So that if the point divides the line joining to in the ratio , then the and 'flip' over in the formula, with the going with the and the with .
Therefore, in the formula above:where goes with and and with and , the point divides the line joining to in the ratio - not .
It's easy to see why if you think of being large compared to .
For instance if , and divides in the ratio , then is much closer to than it is to . So its coordinates will be much nearer 's than 's. So we shall need more and less . Therefore the bigger number ( ) will go with and the smaller ( ) with . They 'flip' over.
Do you get it now?
Grandad
Grandad, thank you for your reply.
I actually DID mean exactly what I said - I just had the formula wrong - which is what brought me here because I knew something was wrong, I just didn't know what. And I did mention that there might need to be ( ) somewhere in the formula. Thank you for straightening me out though. I also found it somewhere with an m and n, instead of r and s. This was confusing to me because m is often used as the slope.
As for your answer, I almost get it now. Do these two equations have names so that I can look up more on them?
About the weighting and flipping: do you mean we don't have to actually switch the r and s in the formula when P3 moves across the halfway point, right? Because as P3 moves away from P1 and toward P2, the value of the variables representing each side naturally shift their weight to the other.
So for both of these cases:
P1--------------P3-------------------------------P2
|--------r------| |---------------s----------------|
or
P1------------------------------------P3---------P2
|--------r----------------------------| |----s-----|
The same formula applies:
Is this what are saying?
Thank you again,
dmw
Hello dmwI'm sorry if I've confused you by talking about 'flipping' the and over. What I meant was that, in the diagram that you've drawn above, although the is on the P1 side of the diagram and the is on the P2 side, when it comes to the formula, they 'swap' sides and the goes with the P2 coordinates and the with the P1 coordinates.
So - yes, the formula is the same for both of the diagrams you've drawn; but, no, it isn'tbecause you haven't 'flipped' them. It should be:
Do you see the difference? P1's coordinates are now multiplied by , P2's are multiplied by . That's what I meant by 'flipping'.
Grandad
YES! Amazing. I do see the difference now. It just click right into place in my mind what you meant.
Do these equation have a name?
Thank you for your further clarification.
---------------------
I am also attempting to find the same formula, except in polar coordinates. If you are interested in helping with this one as well, I have posted this question to another category: University Math Help > Calculus
or here: http://www.mathhelpforum.com/math-he...ar-coords.html
Hello dmwNot especially. They're just the coordinates of a point that divides a line segment in a given ratio.
If you understand vector notation, you get a similar result for the position vector of the point dividing the line joining points with position vectors and in the ratio . It is:
Grandad