Photometric Objects around Cosmic Webs (PAC) Delineated in a Spectroscopic Survey. I. Methods