A diffractive optical filter having a fractional level density s[j] and a transfer
function C[m] that is an approximation to a desired Hermitian, passive transfer
function B[m] is provided. The fractional level density s[j] is obtained by Fourier
(or inverse Fourier) transforming B[m] to obtain t[j], calculating u[j]=t[j]-min(t[j]),
calculating v[j]=u[j]/D where D is the sum of u[j] over j, and setting s[j] substantially
equal to v[j]. A 2-D tiltable mirror array can be used to provide a 1024 tap optical
filter having 10-bit tap resolution. Applications of the invention include laser
tuning elements, spectroscopy and wavelength-division multiplexing, switching,
and/or filtering.