Analysis and synthesis of three-dimensional illumination using partial coherence