Computes z for the sphere