Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

Thanks

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Try this:

$$ \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} $$

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.