Find increment amount to get from $(x_1, y_1)$ to $(x_2,y_2)$ one dot at a time

944 Views Asked by At

If I have two points in positive cartesian coordinates, how do I find:

  1. The slope of a line between those points
  2. The increment amount to get from $(x_1, y_1)$ to $(x_2, y_2)$ one dot at a time.

What I know so far is $m=\frac{y_2-y_1}{x_2-x_1}$

But that gives me a single number, I need a pair of numbers I can add to $x$ and $y$ over the course of a series of iterations to reach $(x_2,y_2)$.

Thanks

1

There are 1 best solutions below

3
On BEST ANSWER

For every increment (displacement) $t$ that you add to the $x$-coordinate, you add $mt$ to the $y$ coordinate. So $(x,y)$ becomes $(x+t,y+mt)$.