1. A method of imaging a scene, the method comprising: A) generating a temporally varying optical intensity pattern from at least one continuous wave (CW) light beam with an array of phased modulators; B) illuminating at least one portion of the scene with the temporally varying optical intensity pattern generated in A) so as to cause a photon to scatter or reflect off the at least one portion of the scene; C) detecting, using a single-photon detector, the photon reflected or scattered from the at least one portion of the scene in B); and D) estimating a distance between the single-photon detector and the at least one portion of the scene based on the temporally varying optical intensity pattern generated in A) and a time of flight of the photon detected in C).