If you have the coordinates of the end points simply average each of them. i.e. if the end points are (x1,y1) and (x2,y2) then the midpoint is ( (x1+x2)/2, (y1+y2)/2 )
If you have the coordinates of the end points simply average each of them. i.e. if the end points are (x1,y1) and (x2,y2) then the midpoint is ( (x1+x2)/2, (y1+y2)/2 )