A novel method for the design of diffractive optical elements based on the Rayleigh–Sommerfeld integral