# Math Help - 3 points on a line

1. ## 3 points on a line

Given points A(x1, y1) and B(x2, y2), I'm supposed to derive the coordinate of the point C
which should be on the line AB (such that B is on the line segment AC), such that the distance CB is 0.5*distance AC. The point is to avoid the solution where C is on "the other side", such that A is between C and B. We should obtain the solution where B is between A and C.

Thanks

2. Originally Posted by onako
Given points A(x1, y1) and B(x2, y2), I'm supposed to derive the coordinate of the point C
which should be on the line AB (such that B is on the line segment AC), such that the distance CB is 0.5*distance AC. The point is to avoid the solution where C is on "the other side", such that A is between C and B. We should obtain the solution where B is between A and C.

Thanks
So in other words we want B to be the midpoint of A and C. I get $C = (x_1 + 2(x_2-x_1), y_1 + 2(y_2-y_1)) = (2x_2 - x_1, 2y_2 - y_1)$.

3. Thanks for the message. Actually, the distance BC should be equal 0.5*distance AB, so the point B is between A and C, but not really the midpoint. It would be good to express the coordinates with the variable 'percent'(this 0.5). ?

4. Originally Posted by onako
Thanks for the message. Actually, the distance BC should be equal 0.5*distance AB, so the point B is between A and C, but not really the midpoint. It would be good to express the coordinates with the variable 'percent'(this 0.5). ?
In that case I get

$C = (x_1 + 1.5(x_2-x_1), y_1 + 1.5(y_2-y_1)) = (1.5x_2 - 0.5x_1, 1.5y_2 - 0.5y_1)$

In general

$C = (x_1 + (1+p)(x_2-x_1), y_1 + (1+p)(y_2-y_1))$

where length of BC is p times length of AB.

5. Thanks