Assuming the earth to have a constant density