Matlab code to generate 2D wallpaper patterns.