home *** CD-ROM | disk | FTP | other *** search
- This software was written in MicroSoft Visual Basic version 3.0.
- The Author takes no responsibility for its use, or any
- resultant damage to data, or computers on which it is used,
- or for that matter on the eyes and minds of those people who
- chose to stare at such things.
-
- Version 1.0 Released into the Public Domain by the Author
- Paul McMahon October 1993.
- (CIS 72050,426)
-
- The Emperor's New Clothes
- One Upon A Time while walking in a shopping mall a man saw a
- crowd of people. He rushed over to see what was happening
- and found everybody staring at these funny pictures made up
- of dots. The salesman said "Just keep looking and you will
- see a wonderful picture appear". Suffice to say the man
- couldn't see the picture but played along so as not to look
- dumb.
-
- This was my introduction to the art of 'SIRDS', after some
- time and staring I found I could see the pictures, and yes
- they were interesting, but how were they made? This program
- is the result of my attempts to find out.
-
- This program runs under Windows 3.1 and will accept picture
- files in several formats (BMP,DIB,WMF,RLE,ICO) and translate
- them into random ( or otherwise) dot stereogram images. These
- images can then be looked at on the screen, printed out, or saved
- as bitmap (BMP) files. The normal windows copy and paste is also
- supported.
-
- The drawing is done, say in Paintbrush, with different
- colours representing the different levels or planes of
- depth. Which colour is which level is configureable, but the
- colours currently used can be seen in the options form.
-
- Colours for each level can be configured in a number of ways:
- 1.
- Select Options.
- Click on the colour/level you wish to set.
- Click the set button.
-
- 2.
- Select Options.
- Double click on the colour/level you wish to set.
-
- 3. ( I find this the most usefull)
- Open the picture you wish to translate.
- Select Options.
- Click on the colour/level you wish to set.
- Move/drag the options form out of the way.
- Double click on the source picture over the colour you wish.
-
- All the above can be repeated as desired. Changes made will only
- be saved, or put into effect after OK on the options form is clicked.
-
-
- The act of translation can be started once the source picture has been
- opened, by selecting the calculate menu option (under the file menu).
- This is not a fast process, (sorry), and it is directly related to
- the size of the window, so resize the window to the minimum usable size
- prior to begining calculations.
-
- Important!!!
- If you wish to interupt a translation hit the ESC key and the
- translation should abort.
-
-
- For on screen viewing I find the technique of turning down the screen
- brightness, until you can see your reflection, then slowly turning it
- backup works best.
-
-
- The rest of the usage should be pretty obvious, and after
- all what can you expect for free anyway.
-
-
- The translation can use either a random ( 2 colour or 4 colour) key
- or a pattern ( eg. an icon) that can be set by the user. This pattern
- is not restricted in terms of colours etc. Practically however a pattern
- where adjacent pixels are different has the best effect.
-
-
- The basic algorithm used here is as follows:
- A picture to be translated is some number of pixel's wide,
- say 400, and of immaterial depth.
- A width of vertical strip is chosen, which will give a
- physical strip to strip separation of around about 1 to 4 cm
- . Say for this example it is 50 pixel's wide.
- On the first line the first 50 pixel's(from the left) are
- randomly chosen ( or via some pattern etc.) , ie the information in the
- first 50 pixel's of the picture to be translated is lost.
- The value of the 51st pixel is derived based on the level
- that it is to appear at. If it is at level 0 then it will
- simply be the same as the value now at pixel location 1, if
- it is level 1 then it will be the same as that at location
- 2, and so on.
- In general if the level of the pixel to be translated is 'L'
- and the value of the nth pixel is pixel(n), and the
- separation or strip width is 'W' then:
-
- pixel(n) = pixel(n - (W - L))
- for (n-(W-L)) is > W
-
- or
-
- pixel(n) = random
- for n-(W-L) is < = W
-
- This works for both positive and negative levels. ie level 0 is the
- reference plane, -1 is 1 plane behind this and +1 is 1 plane above it etc.
-
- I don't know if this is the best or only algorithm, but it
- is one I have found empirically to work for me.
-
- To make this program run you need:
- A fast PC.
- MS Windows 3.1.
- ENC.EXE , ENC.TXT, and ENC.INI in the same directory somewhere.
- CMDIALOG.VBX , and VBRUN300.DLL in your windows system
- directory.
- Some sort of drawing package, Windows Paintbrush works OK.
-
- All the files save VBRUN300.DLL are included in this
- archive. VBRUN300.DLL is available on most BBS's. For
- example on Compuserve it can be found in the MSBASIC forum.
-
-
-
- Have fun Paul McMahon.
- (Comments and suggestions to CIS 72050,426 please)
-
-