Find distance between two points, midpoint between two points, slope between two points and line partition