You are not logged in.
Hello,
I want to create a line that is an extension of an other.
So, I want to find the ending point of the second line, knowing the slope of the first line.
How could we do this ?!
Thank you in advance for your help.
I found it in another forum
Let us call the x and y components in each of the ordered pairs as follows:
A = (Ax, Ay)
B = (Bx, By)
C = (Cx, Cy)
Now let us call the slope of the line m and it can be obtained from points A and B:
m = (By - Ay) / (Bx - Ax) = (Cy - By) / (Cx - Bx)
And suppose we want to extend the line by length L from point B to C, we know that:
L² = (Cx - Bx)² + (Cy - By)²
Using these two equations we can derive expressions for Cx and Cy in terms of known quantities. I won't go through the algebra here but the results are:
Cx = L / √(m² + 1) + Bx
Cy = L*m / √(m² + 1) + By