The concept behind stereograms (otherwise known as SIRDS, 3D images or "Magic Eye" pictures) is surprisingly simple. A simple graphical pattern is repeated horizontally across a line, a certain distance apart. Then, in other lines the distance between the pattern repetition is altered slightly. When viewed correctly, the different lines of the image appear to be "floating" in 3D space at different levels.
Here is a simple example of this basic type of stereogram:
Extending this concept to changing the pattern repetition distance within each line, it is possible to display very complex 3D images.
I've always been fascinated by stereograms, ever since I had a Magic Eye book as a child. Once I learnt how simple the algorithm is behind them, I set out to implement it myself.
The image in the screenshot below is very "shallow" - that is, you may have to diverge your eyes less than usual in order to see the 3D image.