imagesc(grating2d(1/50,0,pi/5,1))
colormap(gray)
axis image

imagesc((grating2d(1/20,0,pi/2,1)+grating2d(1/20,0,pi/3,1)))
colormap(gray)
axis image

imagesc((grating2d(1/10,0,pi/2,1)+grating2d(1/20,0,pi/3,1)))
colormap(gray)
axis image

surf((grating2d(1/10,0,pi/2,1)+grating2d(1/20,0,pi/3,1)))

imagesc(threshold(Lena(:,:,2),150))
colormap(gray)
axis image