Fractured images

In Sudokified images, I rearranged an image according to a sudoku pattern. The problem with that effect was that it was not isotropic. Pieces of the image were rearranged within 3-by-3 blocks. The effect is different depending on whether you are looking at the center of a 3-by-3 block or at the boundary between two 3-by-3 blocks.
I thought about this for a while and came up with a pattern that works on an infinite plane. Unfortunately, any pattern that is isotropic on an infinite plane is going to run into problems with the edges and corners when it is used in a finite rectangle. The sudoku pattern already had the edge and corner problems, so I just lined up the corners of the 3-by-3 sudoku blocks with with the corners of the image. The rectangle didn’t make things any worse.
So I had to modify the pattern for the corners and edges. This is not so bad, because people focus on the middle of the image. If you’re going to have irregularities in your pattern, the corners and edges are the best place for them.
