(x1,y1)
(x2,y2)
(xm,ym)
Midpoint formula is given as below.
((x1 + x2)/2 , (y1 + y2)/2 )
Where
(x1 + x2)/2 = xm ----------- (1)
(y1 + y2)/2 = ym ----------- (2)
Equation (1) implies that;
x1 + x2 = 2xm
x2 = 2xm – x1
Equation (2) implies that;
y1 + y2 = 2ym
y2 = 2ym – y1
Thus the end point is
(x2,y2) = (2xm – x1, 2ym – y1)