The question is tagged 'dynamic paint' and there is already a very good answer about that by cgslav.
This solution uses a shader node tree.

Slits are located by two empties. One is moving to vary the effect (but this is not mandatory of course) and value node is keyed with frame number in order to produce the wave effect.
The overall node setting is the following:

On top, 3 parameters which correspond to:
- A keyed value which is equal to the current frame
- Wave speed
- Wave frequency
On left, coordinates inputs, and from top to bottom:
- Shaded object coordinates
- Empty1 coordinates
- Empty2 coordinates
Empties coordinates are added to the shaded object coordinates as this will reflect the empties locations.
If we don't want empties, 'vector' input from the 'sine' node groups can be used to locate the slits directly.
The two 'sine' result are then added and recentered to [0, 1] (they could be between [-2, 2] so we multiply by 0.25 and shift by 0.5.
The 'sine' node group:

It calculates the delta between the two vectors so that we can have it length (dot + sqrt).
Multiply frame by speed and add it to the length and multiply this result by the frequency.
Finally it takes the sinus (or cosinus) of it.
