Given a point, slope and a distance along that slope, easily (?) find a second point.

You can get rid of lots of algebra with a little trigonometry. $m=\tan \theta$, the angle between the $x$ axis and the line. Then $x-x_1=d \cos \theta = d \cos( \arctan (m))=d\frac 1{\sqrt {1+m^2}}$ Similarly $y-y_1=d \sin (\arctan(m))=d\frac m{\sqrt{1+m^2}}$


Nicer solution: you know that the vector $(1, m)$ points in the direction of your line. Divide by $r= \sqrt{1 + m^2}$ to get a unit-length vector $(1/r, m/r)$ that points along the line. Now add $d$ times that vector to $(x, y)$: $$ r = \sqrt{1 + m^2}\\ (x_1, y_1) = (x + \frac{d}{r}, y + \frac{d\cdot m}{r}) $$


It might be simpler to work with vectors, here. You can rewrite as a vector equation $$\langle x,y\rangle = \langle x_1,y_1\rangle +t\langle 1,m\rangle,\tag{$\star$}$$ where $t$ is allowed to vary over all real numbers. Then the distance from $\langle x_1,y_1\rangle$ to a point $\langle x,y\rangle$ on the line is precisely the magnitude of the vector $$\langle x,y\rangle-\langle x_1,y_1\rangle=t\langle 1,m\rangle=\langle t,mt\rangle.$$ Hence, we need $$d=\sqrt{t^2+(mt)^2}=\sqrt{t^2(1+m^2)}=|t|\sqrt{1+m^2},$$ and so we need $$t=\pm\frac{d}{\sqrt{1+m^2}}.$$ Substituting these values of $t$ into $(\star),$ we find that the solutions are $$\left\langle x_1\pm\frac{d}{\sqrt{1+m^2}},y_1\pm\frac{dm}{\sqrt{1+m^2}}\right\rangle.$$

Added: Obviously, this doesn't work with vertical lines, but that's even easier, since only the $y$-value is changing.

Tags:

Geometry