Similar to this question: How to calculate the middle of a line? where it's explained how to find the middle of a line (x,y), so that's half the line 1/2, but I also need to find one third of the line, one fourth, and so on.
I tried dividing by 4 instead of 2 to get 1/4 but it didn't seem to work:
1/2 (works):
$x = \dfrac{x_1 + x_2}{2}$ $y = \dfrac{y_1 + y_2}{2}$
1/4 (doesn't work):
$x = \dfrac{x_1 + x_2}{4}$ $y = \dfrac{y_1 + y_2}{4}$

Think about the formula for the midpoint of a line as $$x = \frac{1}{2}x_{1} + \frac{1}{2}x_{2}.$$ We find the midpoint by taking equal contributions from either end of the line.
If we want to find a point which is one third of the way along the line we should use the following $$x = \frac{2}{3}x_{1} + \frac{1}{3}x_{2}$$ where we take uneven contributions from the two endpoints.
The point one quarter of the way along the line can be found using $$x = \frac{3}{4}x_{1} + \frac{1}{4}x_{2}.$$
The y-coordinates are found in a similar manner.