home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / etc / misc / sirds.faq < prev    next >
Encoding:
Text File  |  2003-06-11  |  30.0 KB  |  740 lines

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