Finding the length of a line in 3D Coordinates