by W.A. Steer PhD
|Back to contents||About...|
I document the development of a top quality algorithm for generating stereograms, and conclude by offering a ready-to-run Windows software package for you to download. You'll also find a few examples of my stereograms as well as hints and tips for creating your own.
Download full 170kB demo stereogram of a steam locomotive .
I originally got interested in stereograms in early 1994, at which time much discussion took place in Usenet newsgroup alt.3d. Back then I wrote some fairly basic programs to draw single image random dot stereograms (SIRDS), but was disappointed to find that the poor resolution of a typical computer monitor put a severe limitation on the depth resolution that could be obtained - typically 10 discrete levels per inch. I then found I could smooth off the steps between the levels, a significant aesthetic improvement, by implementing a form of anti-aliassing, but a side-effect was a very mild ghost-like quality to some areas of the 3D scene. I tried to convince myself then that given a high-resolution medium, really smooth and solid stereograms could quite easily be made.
In early 1995, with renewed interest and convenient access to a laser printer, I turned my thoughts to stereograms once again. It was then that I discovered the major problem with RDS: a pattern of random dots 600 to the inch looks like a pretty even grey mass. To overcome this I had a quick go at printing larger dots but positioning them to 600dpi. The picture was then visible, but the size of the dots were limiting the resolution in the x- and y-directions, and the high contrast was very harsh.
This was the end of the line for SIRDS. Random dots just weren't going to do the trick. I needed to replace the random dots with a pattern which has both large-scale structure to aid easy convergence and small scale detail to convey even subtle 3D depth information.
About April time, soon after I began working on stereograms with patterns, Chris Watkins contacted me about doing a contribution on that very topic for his new book, "Stereogram Programming Techniques". As a consequence my stereogram progression went turbo-charged (despite my having exams in May); I succeeded in writing a good working algorithm and completed a satisfactory write-up by the deadline for the book at the end of May.
"Stereogram Programming Techniques"
by Christopher D. Watkins and Vincent P. Mallette
(Charles River Media, Inc.), 1996
See the Charles River Media page for more information about the book.
You'll be glad to know my exams went well despite the obvious distraction (with hindsight that was probably one of the most stressful periods of my life!), and I was able to spend a few weeks afterwards tidying up the stereogram programs at a more leisurely pace. Over the summer I worked (among other things) on developing a proper user-interface for my programs, hence SISGen was born.
Key features of my software are:
In the summer I was asked by the Alembic group at the University Twente, Holland, if I could make them a stereogram of the 60-carbon atom Buckminsterfullerine (buckyball) molecule for a poster advertising their conference in the autumn. It turned out to be a good test of any stereogram algorithm - and revealed a couple of minor flaws in my program, which were then fixed.
Since then I have periodically returned to SISGen with minor improvements, mainly speedups. The result is that 640x480-pixel stereograms in 256 colours (with 2x oversampling for smoothness) can now be drawn in under 20 seconds in Windows even on an ageing 20MHz 486sx computer. Larger pictures, e.g. A4 size at 135dpi (1400x1000 pixels) take around a minute. On a Pentium 90, the stereograms can be created in just a couple of seconds.
More recently I have completed a set of stereograms for a small company in
Oregon (USA) which makes collectable kaleidoscopes. They have since shown an
interest in poster-sized stereograms, and I now have the capability to
create stereograms up to 5000 pixels wide (10 to 20Mb files!). With a few
more hours adapting the code, the remaining limitations could be removed,
leaving only the free space on my hard disk as the final constraint!
Owing to the file sizes involved, it would be unreasonable (and impractical) to exhibit the full detail of my large, high-resolution stereograms here.
The January 1997 edition of Microsoft Interactive Developer Magazine featured an article on stereogram programming using Java, which was heavily based on my C programs.
©1994-2006 William Andrew Steer