A Ronchi grating is a set of equally spaced parallel wires that creates a diffraction pattern known as a Talbot carpet. The pattern is repeated at multiples of a fixed distance
(the Talbot distance).
The wave in the carpet has the functional form
is the separation between slits in the Ronchi grating. Here the series is approximated with
terms and evaluated in steps of size
 M. V. Berry, I. Marzoli, and W. Schleich, "Quantum Carpets, Carpets of Light," Physics World
(6), 2001 pp. 39–44.