# How to I calculate a second plot point given the first point and the slope?

Is there a formula to calculate the second point in a segment given a starting point, segment length, and slope?

Thanks

-

$$\begin{pmatrix} x_B \\ y_B \end{pmatrix} = \begin{pmatrix} x_A \\ y_A \end{pmatrix} + L_{AB} \begin{pmatrix} \cos \theta \\ \sin \theta \end{pmatrix}$$
where $L_{AB}$ is the length, and $\theta$ is the angle of the segment direction. If you know the $m= \frac{\Delta y}{\Delta x}$ slope then $m = \tan \theta$. In terms the slope the above is:
$$\begin{pmatrix} x_B \\ y_B \end{pmatrix} = \begin{pmatrix} x_A \\ y_A \end{pmatrix} + L_{AB} \begin{pmatrix} \frac{1}{\sqrt{1+m^2}} \\ \frac{m}{\sqrt{1+m^2}} \end{pmatrix}$$