home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Explosion / 100-4013.iso / grafikpr / enc / enc.txt < prev   
Encoding:
Text File  |  1993-10-05  |  4.8 KB  |  133 lines

  1. This software was written in MicroSoft Visual Basic version 3.0.
  2. The Author takes no responsibility for its use, or any
  3. resultant damage to data, or computers on which it is used,
  4. or for that matter on the eyes and minds of those people who
  5. chose to stare at such things.
  6.  
  7. Version 1.0 Released into the Public Domain by the Author
  8. Paul McMahon October 1993.
  9. (CIS 72050,426)
  10.  
  11. The Emperor's New Clothes
  12. One Upon A Time while walking in a shopping mall a man saw a
  13. crowd of people. He rushed over to see what was happening
  14. and found everybody staring at these funny pictures made up
  15. of dots. The salesman said "Just keep looking and you will
  16. see a wonderful picture appear". Suffice to say the man
  17. couldn't see the picture but played along so as not to look
  18. dumb.
  19.  
  20. This was my introduction to the art of 'SIRDS', after some
  21. time and staring I found I could see the pictures, and yes
  22. they were interesting, but how were they made? This program
  23. is the result of my attempts to find out.
  24.  
  25. This program runs under Windows 3.1 and will accept picture 
  26. files in several formats (BMP,DIB,WMF,RLE,ICO) and translate
  27. them into random ( or otherwise) dot stereogram images. These 
  28. images can then be looked at on the screen, printed out, or saved
  29. as bitmap (BMP) files. The normal windows copy and paste is also 
  30. supported.
  31.  
  32. The drawing is done, say in Paintbrush, with different
  33. colours representing the different levels or planes of
  34. depth. Which colour is which level is configureable, but the
  35. colours currently used can be seen in the options form.
  36.  
  37. Colours for each level can be configured in a number of ways:
  38. 1.
  39.  Select Options.
  40.  Click on the colour/level you wish to set.
  41.  Click the set button.
  42.  
  43. 2.
  44.  Select Options.
  45.  Double click on the colour/level you wish to set.
  46.  
  47. 3. ( I find this the most usefull)
  48.  Open the picture you wish to translate.
  49.  Select Options.
  50.  Click on the colour/level you wish to set.
  51.  Move/drag the options form out of the way.
  52.  Double click on the source picture over the colour you wish.
  53.  
  54. All the above can be repeated as desired. Changes made will only
  55. be saved, or put into effect after OK on the options form is clicked.
  56.  
  57.  
  58. The act of translation can be started once the source picture has been
  59. opened, by selecting the calculate menu option (under the file menu). 
  60. This is not a fast process, (sorry), and it is directly related to
  61. the size of the window, so resize the window to the minimum usable size
  62. prior to begining calculations.
  63.  
  64. Important!!!
  65. If you wish to interupt a translation hit the ESC key and the
  66. translation should abort.
  67.  
  68.  
  69. For on screen viewing I find the technique of turning down the screen 
  70. brightness, until you can see your reflection, then slowly turning it
  71. backup works best.
  72.  
  73.  
  74. The rest of the usage should be pretty obvious, and after
  75. all what can you expect for free anyway.
  76.  
  77.  
  78. The translation can use either a random ( 2 colour or 4 colour) key
  79. or a pattern ( eg. an icon) that can be set by the user. This pattern
  80. is not restricted in terms of colours etc. Practically however a pattern
  81. where adjacent pixels are different has the best effect.
  82.  
  83.  
  84. The basic algorithm used here is as follows:
  85. A picture to be translated is some number of pixel's wide,
  86. say 400, and of immaterial depth.
  87. A width of vertical strip is chosen, which will give a
  88. physical strip to strip separation of around about 1 to 4 cm
  89. . Say for this example it is 50 pixel's wide.
  90. On the first line the first 50 pixel's(from the left) are
  91. randomly chosen ( or via some pattern etc.) , ie the information in the
  92. first 50 pixel's of the picture to be translated is lost.
  93. The value of the 51st pixel is derived based on the level
  94. that it is to appear at. If it is at level 0 then it will
  95. simply be the same as the value now at pixel location 1, if
  96. it is level 1 then it will be the same as that at location
  97. 2, and so on.
  98. In general if the level of the pixel to be translated is 'L'
  99. and the value of the nth pixel is pixel(n), and the
  100. separation or strip width is 'W' then:
  101.  
  102. pixel(n) = pixel(n - (W - L))
  103. for (n-(W-L)) is > W
  104.  
  105. or
  106.  
  107. pixel(n) = random
  108. for n-(W-L) is < = W
  109.  
  110. This works for both positive and negative levels. ie level 0 is the
  111. reference plane, -1 is 1 plane behind this and +1 is 1 plane above it etc.
  112.  
  113. I don't know if this is the best or only algorithm, but it
  114. is one I have found empirically to work for me.
  115.  
  116. To make this program run you need:
  117. A fast PC.
  118. MS Windows 3.1.
  119. ENC.EXE , ENC.TXT, and ENC.INI in the same directory somewhere.
  120. CMDIALOG.VBX , and VBRUN300.DLL in your windows system
  121. directory.
  122. Some sort of drawing package, Windows Paintbrush works OK.
  123.  
  124. All the files save VBRUN300.DLL are included in this
  125. archive. VBRUN300.DLL is available on most BBS's. For
  126. example on Compuserve it can be found in the MSBASIC forum.
  127.  
  128.  
  129.  
  130. Have fun Paul McMahon.
  131. (Comments and suggestions to CIS 72050,426 please)
  132.  
  133.