Subject: Making high resolution random dot stereograms

From: [email-masked] (Andy Kinsman 253-7794)
Date: 17 Jun 92 15:07:21 GMT

I have received many of your letters raving about the torus.ps
I posted on this news group last week.  Here is a letter that
has almost all of your questions enclosed.  I will attempt to answer
them in one response.  Wish me luck:-)

>From [email-masked] Wed Jun 17 03:55:14 1992
>
>I got your random-dot torus from alt.3d--its really neato!!
>
>I have always been into vision, optical illusions, stereo
>photography, etc. and first heard of Julez stereograms when I took
>a perception class from V. S. Ramachandran.  They seemed to
>be limited in several respects, but I see you have dealt with some
>of those limitations admirably. For instance, I had only seen ones that
>were two or three layers.  The donut has so many, it's hard to tell
>it's made of layers. 

	I too thought that only several layers were possible, until
	I saw the Pentica ad in EDN several months back.  I went
	madly through my files for past examples and came up with
	about 4, all in two layers.  After some quick calculations
	it appeared that almost a hundred layers could be made if
	the resolution of the printing device was good and the cell	
	size was kept small. The torus uses about 60 if memory 
	serves me right.  With 2400 DPI lithography machines available
	to some, the results could be spectacular, but un-NET-able,
	which is one reason the elevation maps of mine are only 800x800
	pixels.  Adjusting the Postscript code to print it smaller will
	even make the object seem smoother in texture, allowing even
	more levels to be used for output.

>I did find your name, a nice touch to the creation.  

	I can compose a view of many separations at this time.  Each
	crafted with postscript or from any other bitmap.  The bitmaps
	are then summed to obtain the final elevations in the stereogram.
	One in my collection, "Old Glory" is an increasing frequency
	sine wave superimposed on the American flag.  It is a bit of
	failure as the relatively small stars appear as holes.
	
>
>Hey, is the background really flat? It seems kind of lumpy and uneven to
>me, and I can't tell whether that is the nature of the pattern of dots,
>or some depth effect, perhaps caused by throwing a little randomness into
>the exact position of each dot, relative to its corresponding dot.

	Strange you should spot this... The image is manufactured on a
	line by line basis with the first field that is outside (left)of the
	viewing square generated by a random number generator.
	The perturbations you are detecting are inherent in my random()
	function on this computer.  This first field is repeated over
	and over from left to right, inserting and removing pixels
	as a function of elevation of the image.
>
>
>And yet another idea, inspired by your donut:  It would be nice to have
>some shading.  Sure, the original reason for making these random-dot
>stereograms was to prove that we don't need things like shading to 
>perceive depth.  But hey, we're here to make neato pictures, not prove
>theories, right?  Could the density of dots be reduced or increased in
>portions of the figure to imply a directional light source?
>I think this wouldn't work with the panorama mode, but who knows?

	My experiments with attempts at shading have all failed.  Any
	loss of randomness in the overall texture seems to add clues
	that distract the viewer into hunting for other depth information.
	The end result is the image is not viewable.  Try this with
	a photo copy of the torus, and shade it with a pencil.  You
	will probably get results similar to mine.  

>
>I am intrigued by the region where pixels on the very edge of the
>donut are horizontal streaks.  Was this a glitch in the algorithm?
>The top, bottom, and other side get the same shart depth ledge without
> any such streaks.  One of the really cool things about these images
>is that, until you do the fusing, you have no idea what is on the 
>page.  The streaks give it away a little bit.

	Now the algorithm, for the truly curious, others may pass over
	this....  

	Each line is built by on a line by line basis.  Each line consists
	of "offset" pixels of random noise, where "offset" is the number of pixels 
	between the sighting triangles.  Then the noise if followed with the 
	pixels of our elevation map.
	
	For each successive point on the line after the random noise:
 
	pixel[j] = pixel[j - (offset - pixel_elevation)];

>
>Finally, I heard someone in the stereo photog mailing list say
>that Scripps Institute of oceanography was using this technique
>to portray viruses whose structure they are working on.  Have
>you seen or heard of this or other such applications?

	Any 3d object can be rendered this way.  You have to
	accept the resolution available though.  I'd love to get
	my hands on some cartography data, if anybody would care
	to ship me some.
>
>Finally #2, can I download your other stereograms? I am dying
>to see what else you have.

	I will let a few at a time out to alt.3d, as it is the
	best newsgroup to post them at.  They cannot endure the
	jpeg or GIF compression.  So alt.binaries.pictures seems
	not the place.  Look there now for another!
>
>Steve Potter
>[email-masked]

>
>Is Stereo World magazine specifically for stereo-grams? If so, what's the 
>address for a subscription?
>                                                                Todd

	Stereo World
	National Stereoscopic Association
	P.O. Box 14801
	Columbus, OH 43214

	Is a magazine that caters to stereoscopic image enthusiasts.
	Almost every picture in the thing is done 2-up for a stereo
	view.  NOT x-eyed, so you need a viewer, or at least most
	do:-)  They have often published articles on random dot
	stereograms.

	They cost $32 first class postage, and $22 third class, higher
	for other countries.  Write them and ask for details.  They
	were news to me, till a friend pointed them out.

>	Oddly enough, we had one person who could NOT make out the image, but
>could only make out your name at the bottom.
>
>Leonard Schmidt
>[email-masked]

	Surely they were pulling your leg... ?

>I downloaded and successfully (?) extracted torus.ps, but when I
>print it, I get something that I can't make anything of.  How are
>these supposed to be viewed?
>
>Thanks in advance.

	This was the most polite version of this question.  It
	was asked by several:-)

ANS-
Stare into this at a depth that makes the two black triangles
become three.  Four means you are looking too deep, or not
deep enough.  If you are lucky you will see a toroid, or 
donut that fills most of the entire image.  Cut below at the 
line making the first line in the file the one that starts
with the %! and ship to a postscript laser printer.  Wait
about 5 minutes, it will finish printing.  If you can't fuse
the image show it to others and see if they can.  Some are
aided by photocopying it to a piece of mylar, and holding
it at arms length while staring through it at a white wall.
Do this while adjusting the distance of the mylar to the
viewer's eye.  Make sure the wall is about 50 or more
feet away. 

Others find they can view it by looking at their finger
when held between the drawing and their nose.  The finger
is moved slowly back and forth between the viewer and
the drawing until the four fuzzy triangles over the finger
become three fuzzy triangles, and then they concentrate on
the center triangle.  It eventually focuses, and so does
the object in the picture.  In this form the object will
be pressed into the plane, not standing out.  For some
images, my fractal plots, this viewing technique seems to
produce an almost different image. -AAK

>I've never heard about this kind of thing before, and would
>be interested in the history behind it.  Could you post some
>info. about it?  If you can divulge any info. about how these
>were created, I'd be interested in that too.
>
>Thanks much,
>Stan Tazuma
>[email-masked]

	Sorry, can't help much on the history, or even with
	those who have worked with it before.  The EDN ad
	inspired me.  Perhaps others on the net know more of
	the history of the technique.  I must plead ignorant.

See alt.3d for all future posts on the net.  TNX.

-AAK
[email-masked]