Why is it useful to find the distance and midpoint in 3 dimensions?