An illuminator , said illuminator comprising: an illumination waveguide , and a controller ; the illumination waveguide being a planar waveguide with a receiving end and a mirror end , the receiving end being configured to receive a light wave; the planar waveguide being configured to confine light in a confinement direction by total internal reflection and guide the light wave in a guiding plane from the receiving end to the mirror end , wherein the confinement direction is normal to the guiding plane ; characterized by the mirror end comprising a patterned mirror configured to reflect at least part of the light wave back into the illumination waveguide as reflected light, the patterned mirror comprising a pattern configured to confer a diffraction pattern to the reflected light, wherein the diffraction pattern contributes to an interference pattern in the illumination waveguide , the interference pattern having an evanescent field outside the illumination waveguide , wherein the evanescent field of the interference pattern is configured to illuminate an object in close relation to the illumination waveguide ; wherein the controller is configured to control a wavefront of the received light wave and to set a relation between the controlled wavefront and the pattern of the patterned mirror such that the interference pattern forms at least one element of constructive interference for selectively illuminating a portion of the object; wherein the controller is further configured to sequentially change the interference pattern by changing the relation between the controlled wavefront delivered to the illumination waveguide and the patterned mirror such that different portions of the object become sequentially illuminated. an illumination waveguide , and a controller ; the illumination waveguide being a planar waveguide with a receiving end and a mirror end , the receiving end being configured to receive a light wave; the planar waveguide being configured to confine light in a confinement direction by total internal reflection and guide the light wave in a guiding plane from the receiving end to the mirror end , wherein the confinement direction is normal to the guiding plane ; the receiving end being configured to receive a light wave; the planar waveguide being configured to confine light in a confinement direction by total internal reflection and guide the light wave in a guiding plane from the receiving end to the mirror end , wherein the confinement direction is normal to the guiding plane ; characterized by the mirror end comprising a patterned mirror configured to reflect at least part of the light wave back into the illumination waveguide as reflected light, the patterned mirror comprising a pattern configured to confer a diffraction pattern to the reflected light, wherein the diffraction pattern contributes to an interference pattern in the illumination waveguide , the interference pattern having an evanescent field outside the illumination waveguide , wherein the evanescent field of the interference pattern is configured to illuminate an object in close relation to the illumination waveguide ; wherein the controller is configured to control a wavefront of the received light wave and to set a relation between the controlled wavefront and the pattern of the patterned mirror such that the interference pattern forms at least one element of constructive interference for selectively illuminating a portion of the object; wherein the controller is further configured to sequentially change the interference pattern by changing the relation between the controlled wavefront delivered to the illumination waveguide and the patterned mirror such that different portions of the object become sequentially illuminated. <EOS>