Three-Dimensional Distance Calculator