Some of you may have already seen conbagui's tutorial
Gimp Optical Illusion trick TutorialThere's another way of of doing it:
1 - Have a black and white image (any black and white image will do), and name the layer 'Original'.
2 - Duplicate the Original layer twice, and rename them as shown:
3 - Create two white layers and rename them as shown:
4 - On the X Displacement layer - Filters > Render > Clouds > Solid Noise and apply settings:
5 - Apply the same effect on the Y Displacement layer, except change the seed to 2. (Note: The seeds don't have to 1 and 2, but make sure that they are both different)
6 - Change the Foreground colour to 0000ff and the Background colour to 00f00. Then, on the Original layer - Colors > Map > Gradient. It will look like this:
7 - On the Displace layer - Filters > Map > Displace and apply setings:
8 - Apply the same effect on the Displace Inv except change the X and Y Displacement to -5.
9 - Change Displace's layer mode to Grain extract.
10 - Merge the Displace layer with Displace Inv and then change Displace Inv's layer mode to Multiply.
11 - Finally, merge the Displace Inv layer with the Original layer. The final image should look like this: