An optical apparatus comprising a distributed optical structure, the optical apparatus comprising: a planar waveguide comprising an entrance port and an exit port, the planar waveguide substantially confining in one transverse dimension optical fields propagating in two dimensions therein and being provided with at least one set of at least two diffractive elements, wherein each diffractive element is configured to control the amplitude and phase of an incident optical field and to diffract a corresponding diffracted component of the incident optical field with a corresponding diffractive element transfer function so that each set of at least two diffractive elements collectively provides a corresponding overall set transfer function between a corresponding entrance optical port and a corresponding exit optical port by coherent superposition, each diffractive element comprising multiple diffracting regions that are scribed along a nominal contour with unscribed regions therebetween, the diffracting regions having at least one altered optical property so as to enable diffraction of a portion of the incident optical field therefrom, wherein a corresponding diffractive element transfer function of a diffractive element is determined at least in part by said altered optical properties, wherein a fraction of the diffractive element that is scribed to form diffracting regions along the nominal contour of said diffractive element provides a means of controlling diffractive element amplitude, and wherein said multiple diffracting regions of at least one of said diffractive elements have randomly irregularly varying lengths along the contour, and randomly irregular separations therebetween. a planar waveguide comprising an entrance port and an exit port, the planar waveguide substantially confining in one transverse dimension optical fields propagating in two dimensions therein and being provided with at least one set of at least two diffractive elements, wherein each diffractive element is configured to control the amplitude and phase of an incident optical field and to diffract a corresponding diffracted component of the incident optical field with a corresponding diffractive element transfer function so that each set of at least two diffractive elements collectively provides a corresponding overall set transfer function between a corresponding entrance optical port and a corresponding exit optical port by coherent superposition, each diffractive element comprising multiple diffracting regions that are scribed along a nominal contour with unscribed regions therebetween, the diffracting regions having at least one altered optical property so as to enable diffraction of a portion of the incident optical field therefrom, wherein a corresponding diffractive element transfer function of a diffractive element is determined at least in part by said altered optical properties, wherein a fraction of the diffractive element that is scribed to form diffracting regions along the nominal contour of said diffractive element provides a means of controlling diffractive element amplitude, and wherein said multiple diffracting regions of at least one of said diffractive elements have randomly irregularly varying lengths along the contour, and randomly irregular separations therebetween.