# Find 3rd point C collinear to A and B at a specific distance from point A and in the direction of $\vec{AB}$ (A,B and the distance are given)

I have two given points (in 2D) $A$ and $B$ and I would like to compute the coordinates of point $C$ located at a particular distance $d$ (also given) from A and in the direction of $\vec{AB}$. Is there a quicker and smarter way to do that than to try to solve: $$(x_C-x_A)^2+(y_C-y_A)^2=d^2$$ $$x_A(y_C-y_B)+x_B(y_C-y_A)+x_C(y_A-y_B)=0$$ and then choosing the solution of the quadratic equation that corresponds to the point in the direction of $\vec{AB}$ ?

You may use unit vectors. Let $\hat{\mathbf{p}}$ be a unit vector along $\overrightarrow{AB}$ and $d$ be the given distance. Then $\overrightarrow{AC} = \pm d \, \hat{\mathbf{p}}$. Using the formula $\overrightarrow{AC}=\overrightarrow{OC}-\overrightarrow{OA}$ allows us to get the required position vector (and hence coordinates).
• Ah, yes, that's way simpler. Thanks. I should have thought about normalising $\vec{AB}$ and then calculating the coordinates of C based on that. – Tamori Feb 19 '15 at 13:05