A virtual slit for atom optics and nanolithography