Geometry – Move Point A Along a Line

geometrytriangles

Sorry, can't post images if my rep is below 10, and can't post more than 2 links. I removed the http section so it won't count as a link. I hope this isn't against forum rules, I'm not hurting anyone.

i.stack.imgur.com/6nTKo.png

i.stack.imgur.com/Fkbgt.png

i.stack.imgur.com/IHVhL.png


I checked other questions, like this one (A line moving along the hypotenuse of a right triangle) but the answer was too complicated for me to understand. If someone can explain it again, can you please do it in simpler terms?

Best Answer

Assuming that $C$ is the origin, try $P = d\cdot(\cos(\angle A),\sin(\angle A)) + (A-C)$ where $d$ is the length you need to move your point from point $A$, or try $P = (-d')\cdot(\cos(\angle A),\sin(\angle A)) + (B-C)$ where $d'$ is the length from point $B$.

In fact you could have skipped the trigonometry thing, just set $k = \frac{d}{\mathrm{Length}(AB)}$ or $k' = \frac{d'}{\mathrm{Length}(AB)}$ and calculate $$P = k\cdot B + (1-k)\cdot A$$ or $$P = k'\cdot A + (1-k')\cdot B.$$

I hope this helps ;-)