Whats new??
[7] What is a SIRTS/Ascii-Stereogram Updated
[23] Multiple stereograms NEW!
[24] Losing the color NEW!
[25] C code for Windows NEW!
[44] Call for stereograms NEW!
Contents
General questions:
[1] What is a SIRDS/Stereogram/Hollusion/SIS?
[2] Terminology
[3] How do I see them? Everyone else can see them....
[4] Where can I buy the posters from?
[5] How can I generate them myself?
[6] Which books/papers should I read?
[7] What is a SIRTS/Ascii-Stereogram
[8] Where is most of the discussion about SIRDS?
[9] Internet locations for material (lots of pictures!)
[10] Stereogram History
Stereogram creation:
[21] How can I write my own programs?
[22] Creation of SIS
[23] Multiple stereograms NEW!
[24] Losing the color NEW!
[25] C code for Windows NEW!
Miscellaneous/problems:
[41] Stereogram Anecdote
[42] Buying commercial programs
[43] The image I see is "inverted" or "sunk-in"!
[44] Call for stereograms NEW!
Have you walked through a mall lately? These days, as you wander past most of the poster shops, there will be a large group of people staring at the same poster with surprisingly weird expressions on their faces. Some will be in the initial stages of denial or rejection---they will be concentrating, some slowly rocking their heads backwards and forwards, searching for an image that they have never seen before. Others will be grinning from ear to ear, pointing at the poster, chuckling with their friends that a member of their group hasn't seem them yet. "Come on Bill, come on!", they cry and as Bill gets increasingly more frustrated he concentrates harder and harder, until finally (if he's lucky) he sees a true 3D image, without the need for special glasses or equipment.
These pictures are known as Single Image Random Dot Stereograms (SIRDS), or Single Image Stereograms (SIS) depending on whether the picture contains random dots as a base for the 3D effect, or a repetitive pattern. Unfortunately, each commercial company has labelled them differently. Shop owners generally don't know what you mean, unless you say "Hollusion" or one of the many other specific names.
What is a stereogram ?
In this document I refer to stereogram (though, single image stereogram would be more correct) as being something like the image that follows:
/=-- Y+-z-/=-- Y+-z-/=-- Y+-z-/=-- Y+-z-/=-- Y+-z-/=-- Y+-z-/=-- Y+-z-/=-- Y+-z *wm @m@w *wm @m@w *wm @m@w *wm @m@w *wm @m@w *wm @m@w *wm @m@w *wm @m@ O@=*+z @:/O@=*+z @:/O@=*+z @:/O@=*+z @:/O@=*+z @:/O@=*+z @:/O@=*+z @:/O@=*+z @: :*/- :m: *:*/- :m: *:*/- :m: *:*/- :m: *:*/- :m: *:*/- :m: *:*/- :m: *:*/- :m: )*/O@-Y|- )*/O@-Y)*/O@-Y)*/O@-Y)*/O@zO@)*/O@z zO@)*/O@zO@)*/O O@zO@*/O O@zwO@*/ *):O*zO((@*):O*zO*):O*zO*):O*zO*):O*mO*z):O*mO(O*z):O*(O*z):+:O*(O*):+:O*()O*): m))@z@-+m~m))@z@-m))@z@-m))@z@-m))@z*@z@-m@z*@z@@@-m*@z@@@m@-m*@z@@m@-m*@z @@m@ z:+*O-mm*Yz:+*O-mz:+*O-=O-mz:+*O-=O-mz:+*O--mz:+***-mz:+*)***-mz:+****-mz:-+*** m@: @:~+( m@: @:~m@: @: @:~m@: @: @:~m@: @: @m@: @: @m@/@: @: @m@/@ @: @m@+/@ @ -+(*m- o-)-+(*m- -+(*m-Om- -+(*m-Om- -+(*m-Om-+(*m-Om-+-+(*m-Om-+-+*m-Om-+|-+*m m*m |== *m*m |=m*m |=m*m |=m*m |=m*m |=m*m*m |=m*m*m |=m*m+*m + YY/ + ) + YY/ ++ YY/ ++ YY/*Y/ ++ YY/*Y/ ++ Y*Y/ ++-+ Y*Y/ ++-+ YY/ ++-+* YY/ zY=) w ~/YzY=) w zY=) w zY=) z) w zY=) z) w zY=z) w zmzY=z) w zmzY=) w zmz|Y=) + oY*:+:ow+ oY*:++ oY*:m*:++ oY*:m*:++ oY*:m*:+oY*:m* *:+oY*:m* *:+Y*:m* *z:+Y* @ z++ *zo)@ z++ *@ z++ w+ *@ z++ w+ *@ z++ w+ *z++ w+ + *z++ w+ + *++ w+ +* *++ ()=ww+ *O()=ww+ ()=ww+-w+ ()=ww+-w+ ()=ww+-w+ =ww+-w+w+ =ww+-w+w+ ww+-w+w=+ ww z +wO z +z + +z + +z + + + = + + = + + = ( + o +@~@= ozo +@~@=o +@~@+~@=o +@~@+~@=o +@~@+~@=+@~@+~@~@=+@~@+~@~@=@~@+~@~z@=@~ )(w=++ +~z)(w=++ +~z)(w=++ +~z)(w=++ +~z)(w=++ +~z)(w=++ +~z)(w=++ +~z)(w=++ +~ mz- O @ =mz- O @ =mz- O @ =mz- O @ =mz- O @ =mz- O @ =mz- O @ =mz- O @If you stare at this image by trying to focus on something behind the image, you will be able to see, after some-time, a 3-D scene with the letters F Y I detaching from the background. (If you read this document on a monitor it is easier to focus on your image reflected on the screen in order to get the 3-D illusion. If you read this document on paper, try to put a glass in front of it and do the same thing.)
To understand the mechanism which allows you to get this peculiar effect, we should take a look at the process of vision.
The feeling of "depth" that you get by looking at a statue instead
of looking at a photo of the same statue, is due to the fact that
the human body has two eyes.
In the above example with the statue, we need just one eye to get the general shape of the statue. A humble photo does the same. It is the second eye that provides some "extra" information. This extra information is the "depth" of the various parts of the statue. In fact a "photo" gives just a bi-dimensional (x,y) representation, to get the third dimension (z) you need some "extra".
y | |--------- | z | Photo | | / | | | / ---------| |/_______ xBy having two pictures of the same object, taken by two different positions, which is the case of the human eyes, you can get the "z" coordinate to that object. It is a simple geometrical question.
In fig.1 we assume that there are 2 objects, X and Y which are at the same height (y) and different depths (z) and positions (x)
|------------------------------------------------------------| | Fig.1 | | z | | y | | | Y \ | | | \|_____x | | | | | | | | | | | | X ^ | | | | | | | | | | | (o) (o) | | watching | | left-eye right-eye direction | | (depth) | |------------------------------------------------------------|In fig.2 are shown the kind of "pictures" that each eye gets:
(fig.2L -left eye, fig.2R -right eye; the '+' marks the center of each picture)
|------------------------------| |-----------------------------| | Fig.2L | | Fig.2R | | | | | | | | | | | | | | X Y + | | X Y + | | | | | | | | | | | | | | | | | |------------------------------| |-----------------------------|As you can notice the 'X' shifts more than the 'Y' from one picture to another. This is an indication that the X object is 'closer' than Y.
where "dx.hrz.hhh ( A, '+')" means distance (on the horizontal axis) in the hhh picture from object A to origin/center.
Furthermore, with good approximation we can say that any objects with the same 'shift' are at the same "depth" (z)
In the same way, the eyes forward to the brain two slightly different pictures. It is the brain that must "compute" a 3-D representation of the scene. The difficulty is to know which pairs must be associated to "compute" the z-coordinate. In the example above it's easy to assume that the 'X' from each picture is associated to one 'X' object. The same goes for the two 'Y'. But the images that the brain gets to compute, can be quite complicated. What if there are more X-s and Y-s in each picture ? How does the brain establish the "couples" for which to calculate the shift/depth ? A clue is that each pair must be on the same height (y). Which means that the brain should not try to associate spots, patterns that are located at different heights. But that is not enough !
The 'brain' can make mistakes in this process of designation of pairs! It is that which make possible the 3-D feeling that we get from stereograms.
The simplest stereogram that we can get is something like-this:
_______________________________________________________________ | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | | * * * * * * | |-------------------------------------------------------------| Column:1 2 3 4 5 6Using the same procedure as in the beginning of this document you should be able to see the same '*' columns but "somewhere behind" this document.
In fig.3 (Left/Right) I have represented the kind of pictures that the eyes forward to the brain when looking at the preceding stereogram. (notice '+', the center)
|-------------------------------| |-----------------------------| | : : : : :Fig.3L | |: : : : : Fig.3R | | : : : : : : | |: : : : : : | | : : : : : : | |: : : : : : | | : : : : : : | |: : : : : : | | : : +: : : : | |: : : : + : | | : : : : : : | |: : : : : : | | : : : : : : | |: : : : : : | | : : : : : : | |: : : : : : | | : : : : : : | |: : : : : : | |-------------------------------| |-----------------------------| column: 1L 2L 3L 4L 5L 6L 1R 2R 3R 4R 5R 6RNormally the brain will associate the columns in the following way:
but it can happen that the brain does the following association:
Remember: All columns look alike !
Of course it is possible that the brain makes other associations of these
kinds:
It can be noticed that by choosing a diferent association of columns the "shift" between the images of the objects changes. As a result the "depth" of the perceived objects changes. In the association 1L-2R, 2L-3R,... the shift is reduced -> the "depth" increases -> the columns seem somewhere behind.
Is it possible to determine exactly the power of the brain in matching complicated images ? I thought, some time ago, what would happen if we put someone in front of a large panel situated at a convenient distance (so that the eyes are relaxed) and the panel is full of randomly disposed spots. The spots should be all alike and in very great number, very small but big enough to not became a uniform gray. The brain should be overwhelmed by the great number of matches that it must try. What will happen ? The person will get dizzy ? get a headache ? Or will the person be forced to see just a gray fog ?
Most Stereogram pictures are usually generated so that if you look at (converge your eyes on) a position twice as far away as the picture, and focus on the picture, generally after a few minutes you see a surprising 3D image!
Most people find this extremely difficult for the first time. You have to focus on a point which is different from where you are looking. This is known as "de-coupling" your vision process. Instinctively people focus at the same point they are looking at, and this is the main obstacle in seeing images of this type.
This is why most posters come with a reflective surface such as glass or plastic covering them---if you try to look at your reflection you will be looking at a point twice as far away as the actual poster. It has been noted by almost everyone that while this sometimes helps beginners see the 3D effect for the first (and perhaps even the first few) times, experienced viewers to not need any help like this, and indeed the reflection is usually very distracting and decreases the quality of the 3D effect.
There are many ways to teach this de-coupling to either yourself or to others, including (in almost no particular order):
NOTE: It is generally easier to see Stereograms under bright light. I have been told this is because you eye relies less on focus under harsh conditions. Another point, to see stereo images, you need to have "passable" use of both eyes. If you wear glasses try with and without them on. Some short-sighted people can see them easier without their glasses on (if they get closer to the picture).
The pull-back
Hold the picture (or move your face) so your nose is touching the picture. Most people than can not possibly focus with something this close to their eyes, and they will be content with their inability to focus. With the picture up close, pretend that you are looking straight ahead, right through it. Now slowly pull the picture (or your face) away while keeping your eyes pointed straight ahead. If you do this slow enough, an image usually appears when the picture is at the correct distance.
The reflection
As mentioned above, with a reflective surface it is sometimes a lot easier to converge your eyes in the correct position. You simply focus on your nose or some central reflection in the picture, and wait until you focus on the image.
The drunk-eyes
This method is used to describe the feeling of the process of deconverging your eyes. It is very much like being drunk or having "staring-eyes". Your eyes don't look at the object, but rather through it. This state is common to some in the morning before the coffee caffine fix.
The wall, or the finger
Hold the picture so that it is half between you and a wall. Look *over* the top of the picture towards the wall, and focus on something such as a picture hook or mark. While keeping this "gaze" either slowly lift the picture or lower your eyes while keeping them converged on the wall.
A similar approach (but for cross-eyed viewing) is to stand arm's length away from the picture and put your finger on the picture. While slowly pulling your finger towards your face, keep looking at your finger, you will notice the picture becoming blurry, and at an intermediate position you will (eventually) see the 3D image.
The see-through
If it is possible, photocopy the picture onto a transparency. Then focus through the transparency onto something twice as far away. This is similar to (The wall, or the finger) above except now you don't need to change the position of your gaze.
Cheating...
To cheat, photocopy the image onto two transparencies, then overlay them and carefully shift them horizontally so they are about an inch or two out of alignment. Somewhere around this position you will see a rendition of the image. Obviously in 2D not 3D, but you will at last finally believe there is "somethere in there."
For those who do not have a local SIRDS distributor (i.e., the poster cart at the mall), here are a few companies you may be able to order from.
$20 Earth (mercator projection of the Earth's altitudes)
$20 Salt Lake LDS Temple Centennial
$20 Beethoven (300 DPI! Very smooth.)
These prints are 18x24 inches. Retail price for the 18x24 inch prints is $20 plus $3 s/h. Utah residents add 6.25% sales tax. Wholesale and distributor discounts are available. Quotes for custom work are also available. Cost and minimum order varies, based on content.
PO Box 381
Orem, UT 84057-0381,USA
Ph: (801) 221-9233
email: John M. Olsen (jolsen@nyx.cs.du.edu)
(Distributors)
Privileged Traveler
4914 Brook Road
Lancaster, OH 43130, USA
(614) 756-7406
Glow in the Dark Poster Series - $22 (size: 18" X 24")
Retail prices (USA) stated above plus $3 S&H (USA) - call for overseas S&H. Ohio residents add 5.5% sales tax.
92 Turnmill St,
Farringdon,
London, EC1, U.K.
+44 (0)71 490 2342
Paul Dale (P.A.Dale@bath.ac.uk)
tel: +44 (0)225 826 215
Send a catolog request to:
N.E. Thing Enterprises
19C Crosby Drive
Bedford, MA 01730, USA.
-- info from: Neal T. Leverenz (at802@yfn.ysu.edu)
There are many fine programs for generating SIRDS out there in the Internet. The following programs are available from ftp://katz.anu.edu.au/pub/stereograms(IP 150.203.7.91). Here is a list of the ones I currently know about:
"Principles of Cyclopean Perception"
(c) 1972 by Bela Julesz,
MIT press.
Considered by most as the original work oPn Random Dot Stereograms:
-- Charles Eicher (CEicher@Halcyon.com)
"Magic Eye: A New Way of Looking at the World"
(c) 1993 by N.E. Thing Enterprises.
Andrews and McMeel, A Universal Press Syndicate Company
Kansas City, USA. ISBN: 0-8362-7006-1
First Printing, September 1993 ... Fifth Printing, January 1994
Introduction contains a history of the technique and phenomena.
Viewing Techniques are explained. 25 pages of full-color STARE-E-O images.
(Plus images inside the front and back covers.) "Answers" included.
32 pages, hardcover, 8.75x11.5 inches, horizontal format, with slipcover.
US$12.95 ($16.95/Canada)
"Magic Eye II: Three Dimension Trip Vision"
(c) 1992 by N.E. Thing Enterprises/Tenyo Co., Ltd.
Korean Translation (c) 1993 by Chungrim Publishing Co.
All the text is in Korean, so I can't read it. But it has some pretty
cool pictures. They are all SIRxS where x is various patterns/pictures.
I paid US$20 for it. Interestingly, this title doesn't seem to be mentioned
in my N.E. Thing catalog.
-- Mark Hudson (M_Hudson@delphi.com)
They've taken the technique a step further by applying the pseudo-random
patterns as noise superimposed over another image. You look at the pages of
this book and see one image, then cross your eyes and concentrate on the
replicated patterns in the background noise and see the second image. It's
kinda cute.
-- Robert Reed
"Das magische Auge" (German version of "Magic Eye")
(c) 1994, arsEdition, Munich
ISBN 3-7607-8297-3
DM 29,- (seen at a store for this price)
"Stereo Computer Graphics and Other True 3D Technologies"
(c) 1993, David F. McAllister, Ed.
Princeton University Press
ISBN 0-691-08741-5 US$75.00
It has several nice color plates, with stereo "triads". The triads consist
of a left, a right, then another left image. Use the left pair for viewing
walleyed, or the right pair for viewing crosseyed.
-- Mike Weiblen (mew@digex.net)
"Random Dot Stereograms"
(c) 1993, Kinsman Physics, P.O. Box 22682, Rochester, NY 14692-2682, USA.
An excellent source of information (sample RDS and source code)
-- Eric Thompson (E.Thompson@ncl.ac.uk)
ISBN 0-9630142-1-8
US$ 13.95
"Human Stereopsis. A psychological Analysis"
(c) 1976, W.L. Gulick and R.B. Lawson,
Oxford University Press.
R.I. Land and I.E. Sutherland, (1969) "Realtime, color, stereo, computer displays" Applied Optics, 8(3): 721-723; March
D. Marr and T. Poggio, (1976) "Cooperative computation of stereo displarity" Science, 194: 283-287; October 15
D. Marr and T. Poggio, (1979) "A computational theory of human stereo vision" Proceedings Royal Society of London, B204: 304-328 Science, 194: 283-287; October 15
G.S. Slinker and R.P. Burton, (1992) Journal of Imaging Science and Technology, 36(3): 260-267; May/June
D. G. Stork and C. Rocca, (1989) "Software for generating auto-random-dot stereograms", Behavior Research Methods, Instruments, and Computers 21(5): 525-534.
H.W. Thimbleby and C. Neesham, (1993) "How to play tricks with dots" New Scientist, 140(1894): 26-29; October 9
H.W. Thimbleby, S.J. Inglis, and I.H. Witten, (1994) ftp://ftp.cs.waikato.ac.nz/pub/SIRDS (IP 130.217.240.3), in press.
C.W. Tyler and M.B. Clarke, (1990) "The Autostereogram" SPIE Stereoscopic Displays and Applications 1258: 182-196
C. Wheatstone, (1838) "Contributions to the physiology of vision. Park I. On some remarkable, and hitherto unobserved, phenomena of binocular vision" Royal Society of London Philosophical Transactions 128: 371-394
C. Wheatstone, (1838) "Contributions to the physiology of vision. Park II. On some remarkable, and hitherto unobserved, phenomena of binocular vision (continued)" The London, Edinburgh, and Dublin Philisophical Magazine and Journal of Science, series 4, 3: 504-523
For people without graphics displays, or simply like having a 3D .signature, you can create a stereo effect using repetitive characters.
Text Stereograms (not random)
-- the following by Dave Thomas (dthomas@bbx.basis.com)
O O n n n n n n n n n n n n n n n n f f f f f f f f f f f f f e e e e e e e e e e e e e e e e a a a a a a a a a a a a a a a a a a a a a a a a a a a a a r r r r r r r r r r r r r r r r r r r r r r r r r r r r r g g g g g g g g g g g g g g g g g g g g r r r r r r r r r r r r r r r e e e e e e e e e e e e a a a a a a a a a a t t t t t t t t t >>><<<<>>>><<<<>>>><<<<>>>><<<<>>>><<<<>>>><<<<>>>><<<<>>>><< d d d d d d d d d e e e e e e e e e e p p p p p p p p p p p p t t t t t t t t t t t t t t t h h h h h h h h h h h h h h h h h h h h-- the next few are by DR J (me90drj@brunel.ac.uk)
/^\ /^\ /^\ /^\ /^\ #################################################################### #################################################################### _/ #### _/ ####\ _/ #### \ _/ #### \ _/#### \ / ## \__/ ## \__/ ## \__/ ## \__/ ## \ ____ ## ____ ## ____ ## ____ ## ____ ## ____ / \## / \ ## / \ ## / \ ## / \ ##/ \ | 2D |# | 2D |## | 2D | ## | 2D | ##| 2D | #| 2D | | or |# | or |## | or | ## | or | ##| or | #| or | | 3D |# | 3D |## | 3D | ## | 3D | ##| 3D | #| 3D | | ?? |# | ?? |## | ?? | ## | ?? | ##| ?? | #| ?? | | | | | | | | | | | | | -------- -------- -------- -------- -------- -------- \\\\\\\\ \\\\\\\\ \\\\\\\\ \\\\\\\\ \\\\\\\\ \\\\\\\\ \\\\\\\\ \\\\\\\\ \\\\\\\\ \\\\\\\\ \\\\\\\\ \\\\\\\\ \\\\\\ \\\\\\ \\\\\\ \\\\\\ \\\\\\ \\\\\\ /^\ /^\ /^\ /^\ _ / \ _ / \ _ / \ _ / \ _ / \_ \_ / \_/ \_ / \_ / \_ / \_ / \_ / \_ / \ \ / \ \ / \ \ / \ / \ __/ \ __/ \ __/ \ __/ \ __/ \ xx \ /xx \ xx \ \ xx / \ xx / \ xx x XX x \_ x XX \ x x XX \ x x XX \ x x XX _/ \ x XX X XX-x-x-XxX--X XX-x--x-XxX-X XX-x---x-XxXX XX-x----x-XxX XX-x-----x- X XX XxXX X XxX XxXX X XxX XxXX X XxX XxXX X XxX XxXX X Xx XxXX XXxX __X XXxX __X XXxX __X XXxX __X XXxX __ XX XX XX XX XX XX XX __XX ______XX ______XX ______XX ______XX ______XX(Cactii modified from a drawing by Chris Pirillo)
\ . \ . \ . \ . \ .\ \. \ . \. . \ . . \ . .\ . \. . \ . . \\ . \\ . \\ . \\ .\\ \\ \\ \\ . \\ . \\ .\\ \\ \\ \\. \\. \\ . \\ . \\ . \\ . \\ . \\ * . * . * . * . * . * . * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ___/~\_/\____/~\_/\____/~\_/\____/~\_/\____/~\_/\____/~\_/\____/~\_/\_ _/~~\_ _/~~\_ _/~~\_ _/~~\_ _/~~\_ _/~~\_ _/~~\_ _/~~\_ . . . . . . . . + + + + + . . . . * * * * . . . . . . . . + + + + * * * * . . . . . . . . . . . . + + + + + . . . . . . . . * * * * . . . . . . . . . + + + + + . . . . * * * * . . . . * * * * . . . . . . . . + + + + . ' . ' . ' * . ' * . . . . . ' . ' _' ____________________ ' ____________________ ' _ |____|~~ _ |____|~~ _ |____| _ _ ' = ' = / / . -- ,.. / . -- ,.. / ,` '; ,` '; .,.__ _,' /'; . .,.__ _,' /'; . .:',' ~~~~ '. '~ .:',' ~~~~ '. '~ :' ( ) . ; ):;. :' ( ) . ; )::;. '. '. .=----=..-~ .;' '. '. .=----=..-~ .;' ' ;' :: ':. '" ' ;' :: ':. '" ~~~~~~ (: ': ~ ;) ~~~~~~~ (: ': ~ ;) ~~~~~~~~~ '~ \\ '" ./ '~ \\ '" ./ '~ ~ '" '" ~ '" '" ~
Most of the discussion about SIRDS has taken place in alt.3d . A lot of people would like to see the death of SIRDS, both due to the overwelming number of people asking FAQ's, and simply because there is much *much* better 3D out there than this!
Usually people post requests for information to newsgroups such as comp.graphics...unfortunately these people sometimes get flamed, get told it is *impossible* to draw them...if this has happened to you read alt.3d , viva la difference.
http://www.cs.uidaho.edu/staff/hart.dir/sirds
(Vern's SIRDS Gallery)
The following additional information about Julesz seems to be from The Magic Eye, 1993, N.E. Thing Enterprises, Andrews and McMeel. I found it quoted in a newspaper article:
During the 1960s, a researcher named Bella Julesz was the first to use computer-generated 3-D images made up of randomly placed dots to study depth perception in human beings. Because the dot pictures did not contain any other information, like color or shapes, he could be sure that when his subject saw the picture it was 3-D only.
In the years that followed, other people continued using random dot pictures in their work; many of them were graduate students who studied with Julesz. With time they found new and better ways to create these interesting illusions.
"The random-dot stereogram is a very inspiring demonstration of the sophistication and complexity of the information-processing which occurs in everyday human vision.... The first extensive studies of random-dot stereograms were accomplished by Bela Julesz and his colleagues on large and expensive computers, using professional programmers, at the Bell telephone Laboratories." (Boyer,1990)
"Interested readers might consider creating poster-sized images using this technique, or experimenting with supplementary gray-level or color values for each pixel. And, if any reader knows who invented this technique for single image random dot sstereograms, or who created the SEEING THE LIGHT image, please drop a note to this magazine."
There are several approaches to take to write a SIRDS program (we'll start with SIRDS and move on to SIS in the next section).
We have some facts that will help us write the program:
To calculate the relationship between the pixels is the *only* complicated stage. We use an array called 'same[]' which simply points to a pixel (in the same scan line) that has the same value.
The second "for x" loop does this. At each position in the object, calculate the dot separation, calculate where the left and right line of sight will intersect the image, and shuffle the array so there is a one to one link.
After we have this 'same[]' array we simply iterate over the array, picking a colour and propagating it's colour across the bitmap. And then the process is finished, the result: a Single Image Random Dot Stereogram.
#define round(X) (int)((X)+0.5) #define DPI 72 #define E round(2.5*DPI) #define mu (1/3.0) #define separation(Z) round((1-mu*Z)*E/(2-mu*Z)) #define far separation(0) #define maxX 256 #define maxY 256 void DrawAutoStereogram(float Z[][]) { int x, y; for( y = 0; y < maxY; y++ ) { int pix[maxX]; int same[maxX]; int s; int left, right; /* initialise the links */ for( x = 0; x < maxX; x++ ) same[x] = x; /* calculate the links for the Z[][] object */ for( x = 0; x < maxX; x++ ) { s = separation(Z[x][y]); left = x - (s/2); right = left + s; if( 0 <= left && right < maxX ){ { int k; for(k=same[left]; k!=left && k!=right; k=same[left]) if( k < right ) left = k; else { left = right; right = k; } same[left] = right; } } } /* assign the colors */ for( x = maxX-1; x >= 0; x-- ) { if( same[x] == x ) pix[x] = random()&1; else pix[x] = pix[same[x]]; Set_Pixel(x, y, pix[x]); } } }
kindly written by
Pascal Massimino (massimin@clipper.ens.fr)
(As opposed to Subject21, where the creation of a SIRDS was based on a bitmap, here we have a ray-tracing approach. ftp the RaySIS program)
The first step in the generation of a SIS (Single Image Stereogram) is to transform the scene you want to render into a depth field. One interesting method is to scan your screen line by line and intersect objects with one ray (say using a ray-tracing assimilated method). But you can also slice your scene if it appears more convenient. A proper rescaling of your depth may also be useful when objects extend to far from (or to close to) the eyes, for this could make your SIS hard to be seen when finished.
Once you've got your depth field, this 3D information requires been encoded in the SIS using a repetitive pattern. You will need to set proper pixels to the same color, this color being taken from an initial pattern. The following sketch shows the pixels (marked with 'o') on the screen that will need be allocated with the same color. The initial ray is the one (passing right in the middle of your eyes) that was used to determine h, the depth related to the scanned pixel (*). Then, from the point of intersection, two rays have been drawn in the direction of the eyes. They determine position of the linked pixels 'o', separated by a distance dx.
initial ray | Eyes: Left | Right +<-------ES------>+ ES=eye separation \ | / \ dx | / \ <---|---> / Screen --------------------o----*----o------------------- ^ \ | / ^ | \ | / | h| \ | / | | \|/ |H - **** | *********** - -------------------------*** object **--------- average plane ************** in your scene *****************
In your scene you must have a virtual average plane: every point laying on this plane will produce two pixels separated by a distance X on the screen, with X being the width of the initial pattern. This method is non-linear: dx/X*(ES-X)/(ES-dx)=h/H. One can nevertheless approximate this relation to the linear one: dx/X=h/H without your brain getting injured...
This operation needs been repeated for each pixel of the scan line to produce a field of distances dx. The hard part still remains intact: deform this pattern to match the correlations inherent in the formation of the 3D image.
Propagation/deformation:
The initial pattern is drawn, say, on the left of the screen. Then, every pixel of this pattern is redrawn at distance dx, on the right, and re-use the new pattern it produces as initial pattern, etc...
initial new pattern .... ...... pattern after 1st deformation (larger) 2 2' 2'' 1 1' 1'' +---------*+-----------*+--------*--------------- ... | / / | dx /| dx / +-->----/ +---->>---/Point 1 goes to 1', which himself is mapped to point 1'', etc...
Problem:
The field dx may present discrepancies, discontinuities, due to objects edges, sides, etc... In the point where this occur are actually points that, in real vision, are only seen with ONE eye (eg. if your directive eye is looking just in the center of a small box, one side of this box will be seen by the other eye, only). They produce gaps or overlappings in the pattern deformation/ propagation. But you can ignore this overlapping or fill the gaps with what you want (the initial pattern for instance),for this points does not take part of the 3D-effect. As a drawback, this can cause ghost-objects to appear when you are not focusing on the right distance (that is: the angle between your eyes' sight direction is *nearly* good, but your lens did not catch the right focal distance).
Note:
Because dx is not an integer, but a real number,interpolation of colors is required to avoid pixel-level slices of the objects to be generated. Scene will then appear smooth.
You can also start the deformation/propagation from the right or the middle of your screen...
Animation:
Once you've produced stereograms (SIRDS, SIS, or SIRTS), you may create an animation out of the them. But some problems arise:
The pattern of the background is *not* fixed, because it's content *heavily* depends on the position of the objects in your scene. Each new frame will produce different background. There are some methods to damp this: let a part of stereograms untouched by deformations, free from objects, so your eyes have a stable part to catch in the animation. This work rather well with SIS if your using a deformation of pattern that started, for instance, from the left: this part of the stereograms will remain the same along the animation.
A more biological problem: the brain is not used to see objects moving without the textures, that *seem* tied to the object, moving with it. Especially with SIS, the objects rather appear to be moving under a colored piece of sheet than in front of you, but this is just a matter of acclimatization. Do you remember the first time you saw a stereogram ?
There still remains a mean to temper this effect: in fact, to gain the third dimension in your image, you dropped one degree of freedom (colors). But there still remains some latitude in the choice of the pattern you use. You can choose any colors you want in a pre-definite vertical strip of your stereogram. So, why don't you choose a 'pattern' which is, for instance, a classicaly ray-traced image of your object, whose horizontal position can be adjust to superimpose and match your object when the 3D-effect will take place ? The only restriction is that your object does not extend to much beyond the strip, for only a part of width less than X can be color-controlled by this mean.
Is it possible to generate a stereogram such that the image is dependent on the viewing rotation?
The short answer is YES! In a "normal" stereogram the constraints are only in the horizontal direction, but by assigning constraints in 2-dimensions instead of linearly across the image, it is possible. I believe the first time I saw this was an image by Tyler [to be referenced].
--comment by John Olsen to Andrew Steer(follows)
>Also I think it should be possible to create a stereogram which gives
>TWO images: one when viewed landscape and another when looked at
>portrait. It would however only be possible for certain patterns
>and NOT in general (your average real image or logo).
Typically, you can only do a small image, entirely contained in the first copy of the random buffer (50 pixels wide in your case). The "vertical" image is repeated, but it gets more and more distorted as you go across the page.
There are, as you say, limited things you can do which cover greater areas, but the limitations are rather severe. The quality of the results depends on how much error you're willing to put up with, as "fog" and uncertainty in the resulting image if you want both vertical and horizontal to be full page images.
Can you "tile" or "wallpaper" stereograms?
--from the net
Some people say YES!, others say NO!
Is it possible to see two *completely* different images by alternating between the "wall-eyed" and "cross-eyed" techniques?
Most definately! The problem that is encountered is if we want two different images to be seen, each pixel on the stereogram corresponds to *two* different positions, this is a form of 3D aliasing which people refer to as "fog" -- or more plainly "hard to see". Using a method that creates links between corresponding pixels in the image (such as the one in Subject 21) the links simply need to be updated for each 3D object.
People have tried a simple method to ameliorate this; when generating the stereogram alternate using a pixel for the wall-eyed or cross-eyed approaches, this will at least half the horizontal resolution. [Has anyone tried this alternating technique?]
By using complementary colors for the left and right eye, is it possible to create a stereogram in which the 3D image "loses" it's color and appears in greyscale?
Yes! It can be done. Would anyone like to elaborate on this matter? :-)
From: zcapl31@ucl.ac.uk (William Andrew Steer)
Newsgroups: alt.3d
Subject: Constructing SIRDS, Windows source code MK1
Summary: Most basic program to draw SIRDS, written in C++ for Windows
Date: Tue, 31 May 1994 11:06:20 GMT
This is about the simplest Windows program for drawing SIRDS. It is only bare-bones, you'll have to modify the program for alternative depth sources, and the SIRDS is reconstructed from scratch after every WM_PAINT message ie whenever the window is resized or uncovered. Use CTRL+ALT+DEL to exit while it's drawing.
If you don't program in C, just look at the TMyWindow::Paint function. You should be aware that the random(arg) function returns an integer between 0 and arg-1.
If you have Turbo C++ then make a copy of one of the example project files in the /tcwin/owl/examples subdirectory, and copy the program below to your /examples subdirectory. Open Turbo C++, load the new project, and change it's contents to include just the program below and OWL.DEF. It should then run ok.
[-- later comments by Andrew Steer
I would like to stress that it uses the 'lookback' algorithm,
which has some limitations, namely:
- it assumes that the right eye looks perpendicular to the screen
while the left eye looks slightly sideways (so the rays converge),
when in reality both eyes should look inwards. This causes asymmetry
in the image (which according to some sources makes it more difficult
for some people to see) and results in near objects appearing
marginally further right than far ones.]
I have since developed algorithms for linear depth, and improved Z-resolution. I'll post the program tomorrow [dated Tue, 31 May 1994].
// ObjectWindows SIRDS Program (C) W.A. Steer 1994 // email: w.steer@ucl.ac.uk // Simplest routine possible // // // Picture not stored // - is completely redrawn for each WM_PAINT #include < owl.h > #include < math.h > const pattwidth=96; // the basic repeat distance. // On a 14" monitor and 640x512 display, 96 pixels // represents about half the distance between the eyes. const NumColors=4; // Define the colors to use in form 0xbbggrrL // 0x signifies hex notation // bb blue value, gg green value, rr red value // L tells the compiler the constant is Long ie 32bit COLORREF cols[NumColors]= { 0x000000L, 0x800000L, 0xFF0000L, 0x000080L }; // ---------------- TMyWindow ---------------- class TMyWindow : public TWindow { public: TMyWindow( PTWindowsObject AParent, LPSTR ATitle); virtual void Paint( HDC PaintDC, PAINTSTRUCT& PaintInfo ); }; TMyWindow::TMyWindow( PTWindowsObject AParent, LPSTR ATitle) : TWindow(AParent, ATitle) { Attr.W=620; // Set the default window size to 620x340 Attr.H=330; } void TMyWindow::Paint(HDC PaintDC, PAINTSTRUCT& ) { int pixels[700]; int x,y; int h; // height of 'features' above the background int l,pl; // lookback and previous lookback distances long r,s; // temporary storage for constructing sphere for (y=0; y<300; y++) { for (x=0; x=36) && (y<=164)) { r=64*64-(y-100L)*(y-100L); if (r>0) { s=r-(x-256L)*(x-256L); if (s>0) h=sqrt(s)+64; } } // Calculate the lookback distance l=(int)(pattwidth-h/8.0+0.5); // if image has got deeper (new lookback is greater // than old lookback distance) generate a new pixel, // otherwise repeat an old one if (l>pl) pixels[x]=random(NumColors); else pixels[x]=pixels[x-l]; pl=l; } // Copy the image to screen for (x=0; x<612; x++) { // use the colors defined at the top in cols[] // if you're not using Windows don't worry about PaintDC parameter SetPixel(PaintDC,x,y,cols[pixels[x]]); } } } // ---------------- TMyApp ---------------- class TMyApp : public TApplication { public: TMyApp(LPSTR AName, HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) : TApplication(AName, hInstance, hPrevInstance, lpCmdLine, nCmdShow) {}; virtual void InitMainWindow(); }; void TMyApp::InitMainWindow() { MainWindow = new TMyWindow(NULL, Name); } int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { TMyApp MyApp("Original SIRDS by W.A.Steer", hInstance, hPrevInstance, lpCmdLine, nCmdShow); MyApp.Run(); return MyApp.Status; }
-- William C. Haga (wchaga@vela.acs.oakland.edu)
Being one who has used wide-eyed vision on chain link fences ever since I was a kid, I was able to see the images in SIRDS right away. But I've had difficulty explaining the technique to friends. Today I had the latest Games magazine with me at my parents house. Games is running another contest using SIRDS, so there are three in the latest issue. This time I thought of the reflection idea. So I opened mom's china cabinet, put the magazine against the glass in the door, and told mom to keep looking at her own reflection in the glass until the image appeared.
It took less than thirty seconds.
When she saw the 3d train engines, I was subjected to a squeal of delight that I hadn't heard from her for a long time. "EEK! IT'S COMING OUT AT ME! IS THIS EVER NEAT!". Dad tried for about a minute but gave up.
About an hour later, mom and I heard a shout. We went to the dining area, and there was dad with the magazine against the glass in the door. "Isn't that just the most amazing thing!", said he.
Later they were making jokes about teaching old dogs new tricks.
STW_DEMO.EXE: the full package will allow RDS creation
Approx US$40
N.E.Thing Enterprises
P.O. Box 1827
Cambridge, MA 02139, USA.
Config: DOS
STEREOLUSIONS: creater/render/print SIRDS
I/O Software, Inc.
Ph: (909/483-5700 800/800-7970), USA.
Config: WINDOWS/Windows NT
(From William Saito, 3/07/94)
KAI's POWER TOOLS: Photoshop add-on for SIS creation
Config: MAC
To see a stereogram you must converge your eyes in such a fashion that each eye is looking at the corresponding pixel/dot required to get the 3D effect.
If you are converging your eyes in front of the picture instead of behind the picture, you will see the apparent image inverted.
This is what you should be doing:
right left (.) (.) \ / | | \ / | | .....pixel..pixel......(actual picture/poster) \ / | | \ / | | \/ | XX (perceived position in 3D--behind the object)You can see that the separation between the two pixels decreases as the 3D object moves closer towards you eyes...but if you are seeing a "depth-inverted" image, you are probably doing this:
right left (.) (.) \ / \ / \ / \ / \/ XX (perceived position in 3D in front of the object) /\ / \ / \ / \ / \ / \ ..pixel........ pixel......(actual picture/poster)This is where your eyes converge before the object, and we can see that the separation increases as the object moves closer to your eyes. Thus when a method is made to be viewed a certain way, and you do the opposite, you see an inverted image.
From: jolsen@nyx10.cs.du.edu (John Olsen)
Newsgroups: alt.3d
Subject: Call for stereograms
Date: 26 May 1994 22:16:33 -0600
A stereogram distributor has asked me to post the following info. Please
don't contact me about it. Call or write (snail mail) to him. Tell him
you saw my message on the Internet.
----
David Sterling, president of Sterling Crescent International, Inc. is
looking for commercial-grade stereograms to be included in books and as
postcards. He prefers groups of images to singles, and you must be the
original designer (owner of the copyright on the image).
Payment on accepted designs will be on a royalty basis. For an upcoming book deal, he is trying to get all images submitted in final form by the end of June. The postcard work is ongoing.
I'd suggest calling him once you have a list of titles together, and then working out how to get preview copies to him (disk, paper, fax...). He's been distributing stereogram materials for a long time (long for the stereogram business, anyway :^), so he's picky about high quality, good detail, and eye-catching patterns.
He is: