home *** CD-ROM | disk | FTP | other *** search
/ In'side Shareware 1994/1995 January / ish194-95.iso / stereo / rdsdraw / rdsfaq.txt < prev    next >
Internet Message Format  |  1994-06-07  |  31KB

  1. From paul.burnett@toadhall.com Tue Jan  4 10:01:17 GMT 1994
  2.  
  3. Here's the Frequently Asked Questions listing:
  4.  
  5. SIRDS FAQ
  6.  
  7. The following is a smattering of info I've collected about SIRDS.  It is not
  8. too well organized, nor complete, but it answers a lot of FAQs out there.
  9. Please submit any updates/changes to me at thale@novell.com.
  10.  
  11. The following sections are covered herein:
  12.  
  13.    SIRDS terminology
  14.    SIRDS FTP Sites
  15.    Sample TEXT Stereograms
  16.    Commercial SIRDS Software    <-- Need more info
  17.    HOW STEREOGRAMS WORK         <-- By popular demand!
  18.    Stereogram Algorithm         <-- Also new (and rough)
  19.    SIRDS Publications
  20.    C Code to Generate SIRTS
  21.    Hope for the Hopeless
  22.    Commercial SIRDS Posters
  23. -----------------------------------------------------------------------
  24. ----- SIRDS TERMINOLOGY -----------------------------------------------
  25. -----------------------------------------------------------------------
  26.  
  27. SIRDS       Single Image Random Dot Stereogram
  28. SIRD        Single Image Random Dot (not much to view in a dot; used by
  29.             newbies)
  30. SIRTS       Single Image Random TEXT Stereogram, also called ascii
  31.             stereograms
  32. Stereogram  general, simplified term for SIRDS and SIRTS and even
  33.             stereo-pairs (occasionally)
  34. Autostereogram, RDS, Auto RDS
  35.             equivalent to a SIRDS
  36. RLS         Random Line stereograms, instructional in learning stereogram
  37.             concepts (see Slinker and Burton publication)
  38.  
  39. Wall-eyed viewing   Viewing stereograms by focusing past the actual image
  40. Cross-eyed viewing  Viewing stereograms by focusing in front of the image
  41. Focus to infinity   Forcing your eyes' lines of sight into parallel, NOT
  42.                     necessary for wall-eyeing SIRDS!
  43.  
  44. -----------------------------------------------------------------------
  45. ----- SIRDS FTP SITES -------------------------------------------------
  46. -----------------------------------------------------------------------
  47.  
  48. Submissions from E.Thompson#newcastle.ac.uk, kbaum@novell.com, ...:
  49.  
  50. ftp.uwp.edu (131.210.1.4)
  51.   /pub/msdos/picture.viewers/rdsdraw.zip
  52.     EXCELLENT SIRDS painting/generating program.  CHECK IT OUT!
  53. oak.oakland.edu (these are also on wuarchive, but oak is faster)
  54.   /pub/msdos/graphics/mindim20.zip
  55.     Several SIRDS (~32) in an RLE format with versatile viewer.  GET IT!
  56.   /pub/msdos/graphics/sirdvu11.zip
  57.     Nice PCX to SIRDS (color to random dots) converter.
  58.   /pub/msdos/graphics/perspect.zip
  59.     Simple SIRDS paint/view program
  60. wuarchive.wustl.edu (128.252.135.4)
  61.   /pub/MSDOS_UPLOADS/demos/sirdsani.zip
  62.     Lets you load a 3d object, position it, then generates an animated
  63. rotation
  64.     within stereograms.
  65.   /pub/xpgs/xpgs.?.?
  66.     Xwindows stereogram utilities; generator, viewer, mindim rle viewer...
  67.   /pub/MSDOS_UPLOADS/graphics/dynamic.exe
  68.     Animated SIRDS (page flipping)
  69.   /graphics/graphics/mirrors/sugrfx.acs.syr.edu/3d/randot/3drandot.zoo
  70.     Converts color GIF to SIRDS on screen
  71. sunsite.unc.edu
  72.   /pub/academic/computer-science/virtual-reality/3d/
  73.     alt.3d.Z        Older archive of the alt.3d newgroups
  74.     randot          Various programs to make random dot stereograms
  75.     red_blue        Graphic files for viewing with Red/Blue glasses
  76.     stereograms     Graphic and Text files of steroegrams
  77. ftp.cs.waikato.ac.nz
  78.   /pub/papers/???.tar.Z
  79.     Research paper describing sirds, with several improvements
  80.     (archive??)
  81.   shimmer.exe
  82.     Flips through several SIRDS of the same image to create a shimmering
  83.     effect (related to above research paper)
  84. gwaihir.dd.chalmers.se
  85.   pub/een/SIS/*.tif
  86.     Sharp SIRDS in TIFF graphic format.
  87.  
  88. -----------------------------------------------------------------------
  89. ----- SAMPLE TEXT Stereograms (Not random) ----------------------------
  90. -----------------------------------------------------------------------
  91.  
  92. From: dthomas@bbx.basis.com (Dave Thomas)
  93.  
  94.                             O   O
  95. n   n   n   n   n   n   n   n   n   n   n   n   n   n   n  n
  96. f    f    f    f    f    f    f    f    f    f    f    f   f
  97. e   e   e   e   e   e   e   e   e   e   e   e   e   e   e  e
  98. a    a    a    a    a    a    a    a    a    a    a    a   a
  99. a   a   a   a   a   a   a   a   a   a   a   a   a   a   a  a
  100. r    r    r    r    r    r    r    r    r    r    r    r   r
  101. r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r
  102.  
  103.  
  104. g  g  g  g  g  g  g  g  g  g  g  g  g  g  g  g  g  g  g  g  g  g  g  g  g
  105. r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
  106.  e    e    e    e    e    e    e    e    e    e    e    e    e    e    e
  107. a     a     a     a     a     a     a     a     a     a     a     a     a
  108.  t      t      t      t      t      t      t      t      t      t      t
  109. <<<<>>>><<<<>>>><<<<>>>><<<<>>>><<<<>>>><<<<>>>><<<<>>>><<<<>>>><<<<>>>>
  110.  d      d      d      d      d      d      d      d      d      d      d
  111. e     e     e     e     e     e     e     e     e     e     e     e     e
  112.  p    p    p    p    p    p    p    p    p    p    p    p    p    p    p
  113. t   t   t   t   t   t   t   t   t   t   t   t   t   t   t   t   t   t   t
  114. h  h  h  h  h  h  h  h  h  h  h  h  h  h  h  h  h  h  h  h  h  h  h  h  h
  115.  
  116.  
  117. One more from ... well ... YOU figure it out!
  118.  
  119. _-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~
  120. !   Adam      Adam      Adam      Adam      Adam      Adam   ! "Lawn       !
  121. !Spragg   Spragg   Spragg   Spragg   Spragg   Spragg   Spragg!   service!" !
  122. !   Adam      Adam      Adam      Adam      Adam      Adam   !       -Stup !
  123. !Spragg   Spragg   Spragg   Spragg   Spragg   Spragg   Spragg!             !
  124. !   Adam      Adam      Adam      Adam      Adam      Adam   !  atspragg@  !
  125. !Spragg   Spragg   Spragg   Spragg   Spragg   Spragg   Spragg! ucdavis.edu !
  126. !   Adam      Adam      Adam      Adam      Adam      Adam   !   GO AGS!   !
  127. _-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~-_-~
  128.  
  129.  
  130. -----------------------------------------------------------------------
  131. ----- COMMERCIAL SIRDS SOFTWARE ---------------------------------------
  132. -----------------------------------------------------------------------
  133.  
  134. STW_DEMO.EXE: the full package will allow RDS creation
  135.    Approx 40$
  136.    N.E.Thing Enterprises
  137.    P.O. Box 1827
  138.    Cambridge, MA 02139
  139.  
  140. Stareo-3D ??
  141.  
  142. I know there are more!  SEND MORE INFO!
  143.  
  144. -----------------------------------------------------------------------
  145. ----- FREEWARE SIRDS SOFTWARE -----------------------------------------
  146. -----------------------------------------------------------------------
  147.  
  148. RDSDRAW & VECTRDS (in development)
  149.  
  150. Get the most recent versions from:
  151. RAY BBS Munich - ++49 89 984723 - 19200bps - RDSDRAW.LZH/VECTRDS*.LZH
  152.  
  153. Author: Johannes_Schmid@m2.maus.de (don't send mail >16KB!!!)
  154.         Johannes Schmid, 2:2480/843.0
  155.  
  156. -----------------------------------------------------------------------
  157. ----- How Stereograms Work --------------------------------------------
  158. -----------------------------------------------------------------------
  159.  
  160. Let's start with a simple repeating pattern.  First we'll examine viewing
  161. stereograms wall-eyed (focusing beyond the picture).
  162.  
  163.               Adam
  164. Adam                       Adam          <-- PERCEIVED IMAGE (3D)
  165.   \
  166.    \ \
  167.     \   \
  168.     Adam  Adam   Adam  Adam              <-- ACTUAL PICTURE (Flat, 2D)
  169.      \       \
  170.       \         \                        <-- LINES OF SIGHT FROM EACH EYE
  171.        \           \
  172.        (*)           (*)                 <-- EYES
  173.  
  174. As shown in the above graphic, the lines of sight go through different
  175. (but identical) words.  The eyes must be directed to just the right level
  176. behind the picture to get the two "Adams" to line up.  When they do line
  177. up, a single "Adam" appears at the level shown behind the picture.
  178.  
  179. This is why it is easiest for some people to look at stereograms behind
  180. glass.  You simply look at your reflection, which appears to be behind
  181. the glass at about the same level as the 3d stereogram image.  More on
  182. this later.
  183.  
  184. So, why is the second "Adam" in the above image "deeper" than the other
  185. two?  Since the next two "Adams" that line up are FARTHER apart than the
  186. first two, your eyes must diverge a little more to get them to line up.
  187. away.
  188. This causes the next "Adam" to appear deeper in the image.
  189.  
  190.  
  191.               Adam
  192. Adam           |           Adam          <-- PERCEIVED IMAGE (3D)
  193.               / \
  194.              /   \
  195.             /     \
  196.     Adam  Adam   Adam  Adam              <-- ACTUAL PICTURE (Flat, 2D)
  197.            /       \
  198.           /         \                    <-- LINES OF SIGHT FROM EACH EYE
  199.          /           \
  200.        (*)           (*)                 <-- EYES
  201.  
  202. The above graphic was crammed into 10 lines of text.  If we moved the
  203. eyes back (to a more realistic distance), the whole 3d image would
  204. appear deeper, and not so spread out.
  205. Cross-eyed viewing follows the same principles, but brings the focal point
  206. up front of the picture and inverts the image.  I'll use the same eyes and
  207. picture, but move the eyes back for room to illustrate.
  208.  
  209.     Adam  Adam   Adam  Adam              <-- ACTUAL PICTURE (Flat, 2D)
  210.        \   |
  211.          \|
  212.          Adam                            <-- PERCEIVED IMAGE (3D)
  213.          |   \
  214.          |     \
  215.         |         \                      <-- LINES OF SIGHT FROM EACH EYE
  216.         |           \
  217.        (*)           (*)                 <-- EYES
  218.  
  219. Now for the inverse part.  Since the next two "Adams" are farther apart,
  220. you must cross your eyes MORE (converge instead of diverge your eyes) to
  221. get the "Adams" to overlap.  This causes the next "Adam" in the image to
  222. appear closer than the first one.
  223.  
  224.     Adam  Adam    Adam  Adam             <-- ACTUAL PICTURE (Flat, 2D)
  225.            \      /
  226.             \    /
  227.          Adam\ / Adam                    <-- PERCEIVED IMAGE (3D)
  228.              Adam
  229.              /  \
  230.            /      \                      <-- LINES OF SIGHT FROM EACH EYE
  231.          /          \
  232.        (*)           (*)                 <-- EYES
  233.  
  234. Whew.  Ascii graphics are a bit too tight to be very technical.  By the
  235. way, each letter (or pixel) in the 3D image comes from two letters in
  236. the picture.  Stereograms have blurry edges (right and left edges)
  237. because the line of sight from the one eye passes through the picture,
  238. but the line of sight from the other eye is off the picture.  Examine
  239. the wall-eyed example below.
  240.  
  241.                      Adam
  242.        Adam                       Adam     <-- PERCEIVED IMAGE (3D)
  243. \
  244.   \ \
  245.     \   \
  246.        \   Adam  Adam   Adam  Adam         <-- ACTUAL PICTURE (Flat, 2D)
  247.          \     \
  248.             \       \                      <-- LINES OF SIGHT
  249.               \           \
  250.               (*)           (*)            <-- EYES
  251.  
  252. Here, the line of sight for the right eye goes through first "Adam"
  253. in the picture, and the line of sight for the left eye is off the
  254. picture.  (Everything to the left of the first "Adam" in the IMAGE
  255. is blurry.)
  256.  
  257.  
  258. HOW TO GENERATE STEREOGRAMS
  259.  
  260. Random stereograms work the same way; they simple repeat random text or
  261. pixels, instead of words like the "Adam" used above.  Below, the pattern,
  262. "ASDFGHJK", is repeated four times in each line.  (I duplicated it for
  263. easier viewing.)
  264.  
  265.          ASDFGHJKASDFGHJKASDFGHJKASDFGHJK
  266.          ASDFGHJKASDFGHJKASDFGHJKASDFGHJK
  267.          ASDFGHJKASDFGHJKASDFGHJKASDFGHJK
  268.  
  269. As you might guess, the image consists of THREE repetitions of the
  270. pattern, set back behind the picture (wall-eyed).  To add some varying
  271. depth to the image, we can simple add a space in the middle; or better,
  272. we'll add a different letter, the letter Q.  I've also dropped the K
  273. off the end to keep it suitable for framing. :-)
  274.  
  275.          ASDFGHJKASDFGHJKASDFGHJKASDFGHJK
  276.          ASDFGHJKASDFGHJKASQDFGHJKASDFGHJ
  277.          ASDFGHJKASDFGHJKASDFGHJKASDFGHJK
  278.  
  279. Adding the Q has the same effect as adding the space between "Adams"
  280. in the previous example.  Here it is again for comparison.
  281.  
  282.          Adam Adam Adam Adam Adam Adam
  283.          Adam Adam Adam  Adam Adam Ada
  284.          Adam Adam Adam Adam Adam Adam
  285.  
  286. These two stereograms demonstrate going down a level (deeper, for wall-
  287. eyed viewers) by adding a new letter where you want to go down.  The
  288. image returns back to the original level because the added letter was
  289. not repeated down the line; it was essentially deleted again.  Hence,
  290. deleting a letter causes the image to come forward one level.  Lets
  291. look at this by deleting a letter before adding any.
  292.  
  293.          ASDFGHJKASDFGHJKASDFGHJKASDFGHJK
  294.          ASDFGHJKASDFGJKASDFGHJKASDFGHJKA
  295.          ASDFGHJKASDFGHJKASDFGHJKASDFGHJK
  296.  
  297. I deleted an H from the middle row, and added an A on the end to make
  298. it flush again.  This causes the image to come up a level where the H
  299. was deleted, then go back down where the H returns to the pattern.
  300.  
  301. To fully control the ups and downs of stereogram generation, you simply
  302. keep track of what's repeating and add and delete letters when needed.
  303. For example, start with the pattern ASDFGHJK.  If the input for the 3D
  304. stereogram image is 00000000000011111222221111111110000, where the
  305. numbers represent the levels of the 3D image, you simply delete a letter
  306. from the pattern when you go up a level (0 to 1, or 1 to 2), and add a
  307. letter to the pattern when you go down a level (2 to 1, or 1 to 0).
  308.  
  309. If you want to go up multiple levels, e.g., from level 1 to 3, delete
  310. 2 letters from your pattern.  Adding two letters to the pattern likewise
  311. causes a two-level drop in the image.
  312.  
  313. Start each line of the image by dumping the whole pattern.  Recall that
  314. in the examples above, four "Adams" in the picture creates three "Adams"
  315. in the image.  By dumping the pattern to start, we are simple providing
  316. the first "Adam" to build the 3D image from.  Now, we start building the
  317. 3D image.
  318.  
  319.         ASDFGHJK
  320.  
  321. Since the first 12 levels are at level 0, we do no adding nor deleting;
  322. just dump 12 more letters from the pattern in order.
  323.  
  324.         ASDFGHJKASDFGHJKASDF
  325.                 ^image starts here
  326.  
  327. We now have our first transition, from level 0 to 1.  Which letter do we
  328. delete?  Delete the next one in the pattern.
  329.  
  330.         ASDFGHJK
  331.             ^the next letter in the pattern
  332.  
  333. Since G is next, we delete it.  Our new pattern is ASDFHJK, and H is the
  334. next letter to be used in the image.
  335.  
  336.         ASDFHJK
  337.             ^the next letter to use in the image
  338.  
  339. Forget about the G.  Consider it gone forever.  The input now indicates
  340. five letters at level 1.  Since we made the transition to level one by
  341. deleting the G, we simply copy the next 5 letters from the pattern into
  342. the image.  The next 5 letters in the pattern are HJKAS.  (You've noticed
  343. by now that we wrap around when we get to the end of the pattern.) I'll
  344. lay the input next to our image to make it easier to see where we're at.
  345.  
  346.                 00000000000011111222221111111110000
  347.         ASDFGHJKASDFGHJKASDFHJKAS
  348.         {      }{          }{   }
  349.         initial  level 0    level
  350.         pattern             1
  351.  
  352. To jump up to level 2 from level 1, we delete the next letter in the
  353. pattern, the letter D.  The new pattern is shown below.
  354.  
  355.         ASFHJK
  356.           ^the next letter to use
  357.  
  358. We have 5 letters at level 2, so we copy the next 5 letters from the
  359. pattern, FHJKA, to the image.
  360.  
  361.                 00000000000011111222221111111110000
  362.         ASDFGHJKASDFGHJKASDFHJKASFHJKA
  363.         {      }{          }{   }{   }
  364.         initial  level 0    lev  level
  365.         pattern             1    2
  366.  
  367. We must now move down a level, from 2 to 1, by ADDING a letter to our
  368. pattern.  Where do we add it?  Add it as the next letter to use.  Let's
  369. add an X (randomly chosen letters work better than previously used
  370. letters).  Since A was the last letter used, S is the next to be used.
  371.  
  372.         ASFHJK
  373.          ^add X here
  374.  
  375.         AXSFHJK
  376.          ^next letter to use
  377.  
  378. Since there are nine letters at level 1, we must copy nine letters
  379. from the pattern to the image (XSFHJKAXS).
  380.  
  381.                 00000000000011111222221111111110000
  382.         ASDFGHJKASDFGHJKASDFHJKASFHJKAXSFHJKAXS
  383.         {      }{          }{   }{   }{       }
  384.         initial  level 0    lev  level level 1
  385.         pattern             1    2
  386.  
  387. Drop another level, from 1 to 0, by adding another letter to the pattern
  388. at the current position.
  389.  
  390.         AXSFHJK
  391.            ^add random letter (M) here
  392.  
  393.         AXSMFHJK
  394.            ^next letter to use
  395. level 0, we copy four letters from the
  396. pattern to the image (MFHJ).
  397.  
  398.                 00000000000011111222221111111110000
  399.         ASDFGHJKASDFGHJKASDFHJKASFHJKAXSFHJKAXSMFHJ
  400.         {      }{          }{   }{   }{       }{  }
  401.         initial  level 0    lev  level level   lev
  402.         pattern             1    2     1       0
  403.  
  404. WE'RE DONE.  Kinda anti-climatic, huh?  Let's duplicate the image line
  405. to make it easier to view.
  406.  
  407.         ASDFGHJKASDFGHJKASDFHJKASFHJKAXSFHJKAXSMFHJ
  408.         ASDFGHJKASDFGHJKASDFHJKASFHJKAXSFHJKAXSMFHJ
  409.         ASDFGHJKASDFGHJKASDFHJKASFHJKAXSFHJKAXSMFHJ
  410.         ASDFGHJKASDFGHJKASDFHJKASFHJKAXSFHJKAXSMFHJ
  411.         ASDFGHJKASDFGHJKASDFHJKASFHJKAXSFHJKAXSMFHJ
  412.  
  413. For each new line in the image, start with a new random pattern, and
  414. follow the steps above.  So, how are graphics stereograms made?  The
  415. same way, using colored pixel values for input.  3drandot uses RED as
  416. the color deepest in the image, with GREEN in the middle, and BLUE as
  417. the highest color.
  418.  
  419. The pseudocode below follows this algorithm.  If you have any questions,
  420. post them in the newsgroup.  Let me know if you are interested in C code
  421. that follows this algorithm.  (The C code here in the FAQ follows a
  422. different algorithm, the "lookback" algorithm.)
  423.  
  424. Enjoy!!
  425. thale@novell.com
  426.  
  427.  
  428. -----------------------------------------------------------------------
  429. ----- STEREOGRAM ALGORITHM --------------------------------------------
  430. -----------------------------------------------------------------------
  431.  
  432. The following is an algorithm I developed for SIRDS generation.  It is
  433. functionally equivalent to the look back algorithms, without looking back.
  434. It can be used for graphic stereograms, as well as the text stereograms.
  435. It simply stores in PATTERN the values we would look back at.  The input
  436. file is depth data, or a z-buffer (see example input below).  The levels
  437. available in a picture are the maximum pattern size divided by two minus
  438. one.  Maximum pattern size should be equivalent to half the distance
  439. between the eyes (for easy viewing), which is about 1 1/4 inches.  So, for
  440. typical text stereograms on an 80 char display, that's about 10 characters
  441. for the maximum pattern size and 4 or 5 levels available.  However, since
  442. 4 or 5 levels is unreasonable, we push the max pattern size to 16 (still
  443. less that the 20 character distance between the eyes).  This gives us about
  444. 7 or 8 levels.
  445.  
  446. If we do allow more than 7 levels when the max pattern size is 16, the
  447. repeating pattern (of size max pattern - current level) grows so small that
  448. four of them in a row (e.g., of size 7) would also create two double
  449. patterns in a row (of size 14), causing floaties (aliasing).
  450.  
  451. I hope I'm making some sense.  I'll try to spend some time rewriting this.
  452. In addition, I'll integrate answers to any questions that come as a result
  453. of this mess!  In addition to the information here, we need to add a good
  454. description of how they work (that is not covered here).
  455.  
  456.  
  457. PL : Previous Level value
  458. NL : Next Level value
  459.  
  460. INITIAL LEVEL SETTING
  461. PL = 0
  462.  
  463. OPEN INPUT FILE FOR READING
  464. WHILE NOT EOF (Y DIMENSION: FOR EACH LINE)
  465.  
  466.    GENERATE NEW PATTERN
  467.    SET PATTERN PTR TO BEGINNING OF PATTERN
  468.    OUTPUT FULL PATTERN
  469.  
  470.    WHILE NOT EOL (X DIMENSION: FOR EACH POSITION)
  471.  
  472.       NL = NEXT INPUT LEVEL VALUE
  473.       IF NL != PL (IF WE'RE CHANGING LEVELS)
  474.  
  475.          IF NL > PL (IF WE'RE MOVING UP)
  476.             DELETE NEXT NL-PL BITS IN PATTERN FROM PTR FORWARD
  477.             (IF GOING FROM LEVEL 0 TO 2, DELETE 2 BITS IN PATTERN)
  478.  
  479.          ELSE (IF MOVING DOWN, AWAY)
  480.             INSERT PL-NL RANDOM BITS INTO PATTERN AT PTR POSITION
  481.             (IF GOING FROM LEVEL 3 TO 2, INSERT 1 BIT INTO PATTERN)
  482.  
  483.          PL = NL (UPDATE PL)
  484.          OUTPUT NEXT VALUE IN PATTERN
  485.  
  486.       ELSE
  487.          OUTPUT NEXT VALUE IN PATTERN
  488.  
  489.       ADVANCE PATTERN PTR (CIRCULAR PATTERN)
  490.       ADVANCE INPUT PTR
  491.  
  492.  
  493. (Redundancy exists to simplify readability.)
  494.  
  495. Assuming spaces translate to level 0, input like this (thanks, Dave
  496. Thomas):
  497.  
  498.  
  499.    22222222222222222          11111111111111111111111
  500.    2222222222222222222        11111111111111111111111
  501.    22222222222222222222       11111111111111111111111
  502.    22222          22222                11111
  503.    22222          22222                11111
  504.    22222          22222                11111
  505.    22222          22222                11111
  506.    22222          22222                11111
  507.    22222          22222                11111
  508.    22222222222222222222                11111
  509.    2222222222222222222                 11111
  510.    22222222222222222                   11111
  511.  
  512.  
  513. Yields output like this:
  514.  
  515. Co6&`R(D(v"i`<$$Co6&`R(D(v"i`<$$Co6&`R(D(v"i`<$$Co6&`R(D(v"i`<$$Co6&`R(D
  516. mwBy&>`,QFdZ<$wamwBy&>`,QFdZ<$wamwBy&>`,QFdZ<$wamwBy&>`,QFdZ<$wamwBy&>`,
  517. 7Z,o:.sw5[rHt&{:7Z,osw5[rHt&{:7Z,osw505[rHt&{:7Zosw505[rHt&{:7Zosw505[rR
  518. g"EzQy{lW_3C&B[8g"Ez{lW_3C&B[8g"Ez{lW_3S3C&B[8g"z{lW_3S3C&B[8g"z{lW_3S3y
  519. yiQ?fiVF!G{TAtrJyiQ?VF!G{TAtrJyiQ?VF!G{T]TAtrJyi?VF!G{T]TAtrJyi?VF!G{T]s
  520. 1`I|r?FLoB#<sf!Q1`I|FLoB#T#<sf!Q1`ILoB#TaT#<sf!Q1`ILoB#Ta#<sf!#Q1`ILoB#T
  521. m$LuSD0hh7\qy5:nm$Lu0hh7\x\qy5:nm$Lhh7\x"x\qy5:nm$Lhh7\x"\qy5:-nm$Lhh7\x
  522. [#7hrqKUm`/<bic$[#7hKUm`/7/<bic$[#7Um`/7r7/<bic$[#7Um`/7r/<bick$[#7Um`/7
  523. L,'O)X\L&Xu)ZUw(L,'O\L&Xu|u)ZUw(L,'L&Xu|y|u)ZUw(L,'L&Xu|yu)ZUwy(L,'L&Xu|
  524. 3`#YPTdg:,;rmy9`3`#Ydg:,;(;rmy9`3`#g:,;(7(;rmy9`3`#g:,;(7;rmy94`3`#g:,;(
  525. 1w^N7d;f964U,yml1w^N;f964&4U,yml1w^f964&;&4U,yml1w^f964&;4U,ym{l1w^f964&
  526. <>Y8igID(]?"A0+;<>Y8ID(]?"A0+;<>Y8ID(]?"?"A0+;<>Y8ID(]?"?A0+;<O>Y8ID(]?"
  527. eRl5hfJx.cD0tscheRl5Jx.cD0tscheRl5Jx.cDeD0tscheRl5Jx.cDeDtscheiRl5Jx.cDe
  528. v,r7f6%<)R-AaV^hv,r7%<)R-AaV^hv,r7%<)p)R-AaV^hv,r7%<)p)R-aV^hv>,r7%<)p)R
  529. VbWqd^]qi(IRW)ytVbWqd^]qi(IRW)ytVbWqd^]qi(IRW)ytVbWqd^]qi(IRW)ytVbWqd^]q
  530. `^Y-z8v=[gBX(Aqq`^Y-z8v=[gBX(Aqq`^Y-z8v=[gBX(Aqq`^Y-z8v=[gBX(Aqq`^Y-z8v=
  531.  
  532.  
  533. This uses 16 as the Max pattern size.  Notice on the third line of the
  534. output (the first line with level changes), the pattern is "7Z ... &{:".
  535. When we go from level 0 to level 2, we lose two characters (i.e., ":.").
  536. When we go from level 2 back to level 0, we insert two new characters
  537. (i.e., "05" after the "osw5").
  538.  
  539. Any questions?  Or better yet, what did I leave out??  I do hope this helps
  540. someone!?!
  541.  
  542.  
  543. -----------------------------------------------------------------------
  544. ----- SIRDS PUBLICATIONS ----------------------------------------------
  545. -----------------------------------------------------------------------
  546.  
  547. Search library databases with these keywords: Stereogram, Autostereogram,
  548. SIRDS (Single Image Random Dot Stereogram), RDS.
  549.  
  550. >From E.Thompson@ncl.ac.uk:
  551. An excellent source of information (sample RDS and source code)
  552. is contained in Andrew A.Kinsman - Random Dot Stereograms
  553. ISBN 0-9630142-1-8  $13.95 U.S.  Published by Kinsman Physics,
  554. P.O. Box 22682, Rochester, N.Y. 14692-2682
  555.  
  556. See the following periodicals:
  557. Journal of Imaging Science and Technology, May/June 1992, Vol 36, #3.
  558.    Slinker & Burton
  559. D. G. Stork and C. Rocca.  "Software for generating auto-random-dot
  560.     stereograms", _Behavior_Research_Methods,_Instruments,_and_Computers_,
  561.     Vol. 21, No. 5, 1989, pp. 525-534.
  562.  
  563. SEND MORE REFERENCES!
  564. -----------------------------------------------------------------------
  565. ----- C CODE TO GENERATE TEXT STEREOGRAMS -----------------------------
  566. -----------------------------------------------------------------------
  567.  
  568. Also from Dave Thomas:
  569.  
  570. Now here's a hack of a hack I found on the net.  Basically it generates
  571. stereograms from ascii diagrams.  Here's the program first:
  572.  
  573. #define DEPTH0  16
  574. #define COLS    79
  575.  
  576. #include <stdio.h>
  577.  
  578. main()
  579.    {
  580.    long now;
  581.    int col;
  582.    char m[COLS+1],s[COLS+1];
  583.    int i,e,c;
  584.  
  585.    /* seed random number generator */
  586.    time (&now);
  587.    srand (now);
  588.  
  589.    /* print fusion X's */
  590.    for (col = 0; COLS - col >= DEPTH0; col += DEPTH0)
  591.       {
  592.       for (i = 0; i < DEPTH0-1; ++i)
  593.          putchar (' ');
  594.       putchar ('X');
  595.       }
  596.    putchar ('\n');
  597.  
  598.    /* process input image */
  599.    while (memset(m,'\0',COLS+1),fgets (m, COLS+1, stdin))
  600.       {
  601.       e = 0;
  602.       s[COLS] = 0;
  603.       for(i=0; i<COLS; )
  604.          {
  605.          e = 0;
  606.          while (i >= DEPTH0 && i < COLS &&
  607.             (c = m[i - DEPTH0]) >= '0' && c <= '9')
  608.             {
  609.             e = 1;
  610.             s[i] = s[i-DEPTH0+c-'0'];
  611.             ++i;
  612.             }
  613.          s[i++] = (e || i < DEPTH0) ? randasc() : s[i-DEPTH0];
  614.          }
  615.       puts (s);
  616.       }
  617. }
  618.  
  619. randasc()
  620. {
  621.    /* large set of random characters */
  622.    return ('!'+rand()%92);
  623.  
  624.    /* lowercase random letters */
  625.    /* return ('a'+rand()%26); */
  626. }
  627.  
  628.  
  629. Try passing it this file as the standard input:
  630.  
  631.            22222222222222222           11111111111111111111111
  632.            2222222222222222222         11111111111111111111111
  633.            22222222222222222222        11111111111111111111111
  634.            22222          22222                 11111
  635.            22222          22222                 11111
  636.            22222          22222                 11111
  637.            22222          22222                 11111
  638.            22222          22222                 11111
  639.            22222          22222                 11111
  640.            22222222222222222222                 11111
  641.            2222222222222222222                  11111
  642.            22222222222222222                    11111
  643.  
  644.  
  645. You'll get output like this:
  646.  
  647.                X               X               X              X
  648. "i`<$$Co6&`R(D(v"i`<$$Co6&`R(D(v"i`<$$Co6&`R(D(v"i`<$$Co6&`R(D(v"i`<$$Co6&`R(D
  649. dZ<$wamwBy&>`,QFdZ<$wamwBy&>`,QFdZ<$wamwBy&>`,QFdZ<$wamwBy&>`,QFdZ<$wamwBy&>`,
  650. rHt&{:7Z,o:.sw5[rHt&{:7Z,osw5[rHt&{:7Z,osw505[rHt&{:7Zosw505[rHt&{:7Zosw505[rR
  651. 3C&B[8g"EzQy{lW_3C&B[8g"Ez{lW_3C&B[8g"Ez{lW_3S3C&B[8g"z{lW_3S3C&B[8g"z{lW_3S3y
  652. {TAtrJyiQ?fiVF!G{TAtrJyiQ?VF!G{TAtrJyiQ?VF!G{T]TAtrJyi?VF!G{T]TAtrJyi?VF!G{T]s
  653. #<sf!Q1`I|r?FLoB#<sf!Q1`I|FLoB#T#<sf!Q1`ILoB#TaT#<sf!Q1`ILoB#Ta#<sf!#Q1`ILoB#T
  654. \qy5:nm$LuSD0hh7\qy5:nm$Lu0hh7\x\qy5:nm$Lhh7\x"x\qy5:nm$Lhh7\x"\qy5:-nm$Lhh7\x
  655. /<bic$[#7hrqKUm`/<bic$[#7hKUm`/7/<bic$[#7Um`/7r7/<bic$[#7Um`/7r/<bick$[#7Um`/7
  656. u)ZUw(L,'O)X\L&Xu)ZUw(L,'O\L&Xu|u)ZUw(L,'L&Xu|y|u)ZUw(L,'L&Xu|yu)ZUwy(L,'L&Xu|
  657. ;rmy9`3`#YPTdg:,;rmy9`3`#Ydg:,;(;rmy9`3`#g:,;(7(;rmy9`3`#g:,;(7;rmy94`3`#g:,;(
  658. 4U,yml1w^N7d;f964U,yml1w^N;f964&4U,yml1w^f964&;&4U,yml1w^f964&;4U,ym{l1w^f964&
  659. ?"A0+;<>Y8igID(]?"A0+;<>Y8ID(]?"A0+;<>Y8ID(]?"?"A0+;<>Y8ID(]?"?A0+;<O>Y8ID(]?"
  660. D0tscheRl5hfJx.cD0tscheRl5Jx.cD0tscheRl5Jx.cDeD0tscheRl5Jx.cDeDtscheiRl5Jx.cDe
  661. -AaV^hv,r7f6%<)R-AaV^hv,r7%<)R-AaV^hv,r7%<)p)R-AaV^hv,r7%<)p)R-aV^hv>,r7%<)p)R
  662. IRW)ytVbWqd^]qi(IRW)ytVbWqd^]qi(IRW)ytVbWqd^]qi(IRW)ytVbWqd^]qi(IRW)ytVbWqd^]q
  663. BX(Aqq`^Y-z8v=[gBX(Aqq`^Y-z8v=[gBX(Aqq`^Y-z8v=[gBX(Aqq`^Y-z8v=[gBX(Aqq`^Y-z8v=
  664.  
  665.  
  666. -----------------------------------------------------------------------
  667. ----- HOPE FOR THE HOPELESS :-) ---------------------------------------
  668. -----------------------------------------------------------------------
  669.  
  670. From: wchaga@vela.acs.oakland.edu (William C. Haga)
  671.  
  672. Being one who has used wide-eyed vision on chain link fences ever
  673. since I was a kid, I was able to see the images in SIRDS right
  674. away. But I've had difficulty explaining the technique to friends.
  675. Today I had the latest Games magazine with me at my parents house.
  676. Games is running another contest using SIRDS, so there are three in
  677. the latest issue. This time I thought of the reflection idea. So I
  678. opened mom's china cabinet, put the magazine against the glass in
  679. the door, and told mom to keep looking at her own reflection in the
  680. glass until the image appeared.
  681.  
  682. It took less than thirty seconds.
  683.  
  684. When she saw the 3d train engines, I was subjected to a squeal of
  685. delight that I hadn't heard from her for a long time. "EEK! IT'S
  686. COMING OUT AT ME! IS THIS EVER NEAT!".  Dad tried for about a minute
  687. but gave up.
  688.  
  689. About an hour later, mom and I heard a shout. We went to
  690. the dining area, and there was dad with the magazine against the
  691. glass in the door. "Isn't that just the most amazing thing!", said he.
  692.  
  693. Later they were making jokes about teaching old dogs new tricks.
  694.  
  695.  
  696. -----------------------------------------------------------------------
  697. ----- COMMERCIAL SIRDS Posters ----------------------------------------
  698. -----------------------------------------------------------------------
  699.  
  700. For those who do not have a local SIRDS distributor (i.e., the poster
  701. cart at the mall), here is one company you may be able to order from.
  702. The following posters are all certifiably cool with lots of great details,
  703. and come in nice colors.  They are (I believe) designed by NVision, or
  704. something like that, and distributed here by Axis Corp.
  705.  
  706. Posters:
  707. $25 Dinosaurs
  708. $25 Discovery (Space shuttle and planet)
  709. $25 Lady Liberty (U.S. Statue of Liberty)
  710. $25 B-2 Stealth Bomber
  711. $25 F-117 Bomber
  712. $25 Nature's Majesty (Eagle with fish in talons, pine trees in bkgrd)
  713. $30 Calypso Reef (Ocean Scene--new design, more detail)
  714. Many more now, including small, $15 posters.
  715.  
  716. Axis Corp.
  717. 1732 S. 790 W.
  718. Salt Lake City, UT 84104 USA
  719. (801)977-8816
  720.  
  721. Include US$5 for shipping and a poster tube.  (The guy quoted me that price
  722. for shipping to Australia.)  Or, you can pay US$17 for a tube in a box.
  723. Although they haven't had any problems shipping in the poster tubes, they
  724. only guarantee safe delivery in a well-packed box.
  725.  
  726. And, by no means am I associated with these guys at all, except I spend a
  727. lot of time enjoying their posters!  (i.e., this is not an ad, but a
  728. response to a request for SIRDS access.)
  729.  
  730.  
  731. ALSO:
  732.  
  733. Infix Technologies
  734. PO Box 381
  735. Orem, UT 84057-0381
  736. (801) 221-9233
  737. contact: John M. Olsen, jolsen@nyx.cs.du.edu
  738.  
  739. Shipping now:
  740. 18x24 Earth (mercator projection of the Earth's altitudes)
  741. 18x24 Salt Lake LDS Temple Centennial
  742. 18x24 Beethoven (300 DPI!  Very smooth.)
  743.  
  744. (others are coming soon, too.)
  745.  
  746. Retail price for the 18x24 inch prints is $20 plus $3 s/h.  Utah residents
  747. add 6.25% sales tax.  Wholesale and distributor discounts are available.
  748. Quotes for custom work are also available.  Cost and minimum order varies,
  749. based on content.
  750.  
  751. ---
  752.  ■ QMPro 1.50 41-8688 ■ ...from San Jose, CA - paul.burnett@toadhall.com
  753.  
  754.