Using Fourier Optics you can simulate the pattern that a focussing mask projects onto a camera for different focuser settings.
Using MatLab these simulations were made for different masks (click links to see download a movie. Somehow you cannot play them directly, but have to store them on disk locally first.