I wish to add d to the end of a straight line. I know the lines start and end point coordinates and its Y = aX + b formula. What I do for now is that I get the angle of this line to determine the distance traveled in both X and Y but I would like to try a different approach, for the sake of learning something.
Since I know the value of a, b and d, I figured I could isolate X starting from X² + (aX + b)² = d² but I realized that I was stuck there, not knowing how to get the X out of the parentheses.
Many of you may realize that I'm just average in math, but I'm here to elarn so I'd like to know how some of you may manage to isolate X and Y in such situations.
Suppose that the line segment is between coordinates $P_0=(x_0,y_0)$ and $P_1=(x_1,y_1)$. Also, let the length of the segment be $D=P_0P_1=\sqrt{(x_1-x_0)^2+(y_1-y_0)^2}$.Then every point $(x,y)$ on the line through the points $P_0$ and $P_1$ satisfies the equation
$$P(t) = (x_0,y_0) + \dfrac tD(x_1-x_0, y_1-y_0).$$
In particular, $P(0) = (x_0,y_0)$ and $P(D)=(x_1,y_1).$
If you put a number line on the line $\overleftrightarrow{P_0P_1}$ with the number line coordinate of $P_0$ being $0$ and the number line coordinate of $P_1$ being $D$, then the function $P(t)$ gives you the $(x,y)-$coordinates of the point on the line $\overleftrightarrow{P_0P_1}$ with number line coordinate $t$.
So the point that adds a length of $d$ to your line segment would have coordinates $P(D+d)= (x_0,y_0) + \dfrac{D+d}{D}(x_1-x_0, y_1-y_0).$