Moving along lines

Many people know what a line is, and many more can draw them using slope. But I've noticed that when trying to draw a line using only the origin and end points, people stumble and fall.

The question is quite simple: How can I draw something without a concrete x and y coordinate?

The answer is also simple: You find them.

Let us imagine you wish to move an object from the origin point (0,0) to a certain end point (8,20). Well, a human would simply realize that (8, 20) translates into a slope of 2/5 (2 up, 5 right) and draw the line accordingly. Unfortunatly, a computer doesn't possess a ruler with which to draw the line. So the person is forced to tell the computer every single point the line goes through. This is done quite easily. In this example, we are moving up and over. So, we already have the Y coordinates. They are points 1 through 20.

But how to get X? It's easy, X is a function of Y. Like so: X=(X1/Y1)*Y

To get a better idea:

X= X1 * Y
__Y1

In this equation, X1 is 8 (the target point's X coordinate) and Y1 is 20 (the target point's Y coordinate). As for Y, simply substitute 1 through 20 to get the X coordinates for it.