1. A system for analyzing an object, the system comprising: a light source producing multiple light components, each having a respective, different wavelength; an optical element configured to direct said light components on to the object and adapted to create known 2D patterns at respective different image planes, an image plane of each of the 2D patterns being displaced from the optical element by a distance that is a known function of a wavelength of a respective one of the light components, such that each of the 2D patterns corresponds to light of a given wavelength; a 2D imager configured to produce a plurality of images of the 2D patterns, each of the images corresponding to a respective 2D pattern, and corresponding to light of a corresponding, respective wavelength, at a corresponding, respective image plane, and each of the images having variable image contrast that varies according to displacement of a surface of the object from the respective image plane such that maximal image contrast of the 2D pattern is achieved when the surface of the object and the respective image plane are coincident; and a processing unit coupled to the 2D imager and being configured, responsively to the variable image contrast of each of the images, to derive an output indicating a characteristic of the object selected from the group consisting of: a tomography and a topography of the object.