home *** CD-ROM | disk | FTP | other *** search
-
- ======================================
- 3D RANDOM DOT PLOTTER, VERSION 1.0
- Online Manual
- ======================================
-
-
- DISCLAIMER
-
- What you are about to read was generated completely by me, Derry
- Bryson, very late at night and may contain few, if any, actual
- facts or useful information. No claim is made to the
- truthfulness or quality of the information contained. Use at
- your own risk!
-
-
- WHAT IS A RANDOM DOT STEREOGRAM?
-
- A random dot stereogram, as the name suggests, is a stereogram
- composed of random dots of color. In general, a stereogram
- consists of two images (one for each eye) designed to viewed in
- such a way as to create a three-dimensional (3D) image.
-
- A common example of stereograms are the discs used with the
- View-Master (at least they used to be common). In the case of
- View-Master, two pictures of each scene were taken (each shot
- from a slightly different position and angle) and placed on
- opposite sides of the disc. When viewed through the
- View-Master, each eye views a different image and your brain
- puts them together to form one apparently solid (3D) image.
-
- In a random dot stereogram both images are combined into one
- seemingly random field of dots. In reality, the stereogram
- consists of series of interleaved strips of dots. Each strip is
- a portion of the image for one eye. These strips alternate in
- the stereogram from left to right, one for the left eye, one for
- the right eye, one for the left eye, and so on. To view the
- stereogram in 3D you must focus your eyes behind the stereogram
- at the distance at which the strips overlap, your mind then
- magically perceives a pattern in the dots and combines the two
- images to form a solid 3D scene.
-
- There are other techniques, which I don't yet understand, that
- appear to be variations on random dot stereograms but don't seem
- quite as random. If you have any information on how these are
- generated, please let me know so I can incorporate them into the
- program as well.
-
-
- WHAT THE 3D RANDOM DOT PLOTTER DOES
-
- The 3D Random Dot Plotter (RD3D) takes a standard 256 color PCX
- graphics file (or a RAW file, described below) and generates a
- random dot stereogram from it that can be viewed on the computer
- screen or dumped out on a printer.
-
- The PCX file is not used as an image in its normal form, but
- rather the color of each pixel in the image indicates the depth
- at the given X and Y position in the scene to be depicted.
- Color 0 is the depth farthest from the viewer and color 255 the
- nearest.
-
- These files can be created with any program that can generate 256
- color PCX files. The actual color of each pixel (as seen on the
- screen) is unimportant, only the value (depth) of the color.
-
-
- USING THE PROGRAM
-
- Use of the program is pretty straight forward; you will be
- prompted for the file to be plotted, how to plot the image, and
- where to display it (screen or printer).
-
- Each prompt is described in the order in which it will be
- encountered below:
-
- File to plot:
-
- You may type in the name of the specific name of a PCX
- (or RAW) file to be plotted or you may enter a wildcard
- pattern and the program will allow you to select from a
- list of files matching the pattern.
-
- For example you might enter *.PCX to select from all PCX
- files.
-
- NOTE: If you select a PCX format file, the file will be
- converted into RAW format and placed in a temporary file
- called TEMP.RAW which is removed when you exit the
- program. You will see a window appear indicating the
- progress of the conversion. It may take a little time
- depending on the size of the PCX file, but it will not be
- converted again as long as you are viewing the same PCX
- file. You should not name any RAW file you might create
- or obtain TEMP.RAW as it will be overwritten.
-
- Pattern width (0-8000):
-
- This is the width of the strips used to create the
- stereogram, as described above.
-
- The pattern width determines both the distance behind
- the image your eyes will have to focus to and the
- maximum depth in the image (the maximum depth cannot
- exceed the pattern width). The program will enter a
- hopefully useful value if you enter a 0 for the pattern
- width.
-
- In general, a value from 1/5 to 1/8 the width of the
- image width works well; however, this may end up being
- either too narrow or too wide for your eyes to easily
- focus on (especially on printed stereograms).
- Experimentation is what this program is good at, so try
- different values until you find one that works for a
- given image.
-
- Maximum elevation (0-8000):
-
- This is the maximum number of depth levels in the
- stereogram and it cannot exceed the pattern width. Lower
- values (between 10 and 50) seem to work best as most
- people can't seem to see the different depth levels
- anyway. Values close to the pattern width usually cause
- a smearing effect across the image that can be very
- distracting and cause problems when viewing.
-
- Maximum colors (2-256):
-
- This the the number of colors that will be used when
- generating the image. Color doesn't seem to add much
- much to the effect, but it looks pretty.
-
- Random number gen seed:
-
- This is the seed value for the random number generater.
- Because computers cannot really generate random numbers,
- but rather generate a seemingly random series of numbers
- we can set the starting point in this "random" series.
- Hence we generate the same "random" dot pattern over and
- over by using the same seed, or use a different seed to
- generate a different "random" pattern.
-
- This can be very useful because one "random" pattern may
- work well with a given stereogram, while another may not.
- If the image appears muddled, you may try different
- values for this field.
-
- Setting this to 0 will cause the program to load the seed
- from the computer's clock which should give a fairly
- random starting point.
-
- Once the values above are entered, you will be presented with a
- menu allowing selection of the device on which to display the
- image. Use the cursor keys to move up and down the menu items
- and press ENTER to select a device. Once a device is selected,
- another menu will appear allowing you to select the resolution
- to use.
-
- If you select a printer as the output device (registered version
- only), you will be presented with a menu allowing you to select
- either LPT1 or LPT2. Select the correct printer port for the
- selected printer. Next, select either portrait or landscape
- mode.
-
- Once you have selected a device for display, the image will be
- plotted.
-
- If viewing on the computer screen, once the image is complete
- the computer will beep. Press any key to erase the image and
- continue with another plot.
-
- If printing the image, you may press ESC to abort any time while
- plotting or printing. WARNING: printing a large image can take
- a few minutes and consume quite a bit of disk space.
-
-
- VIEWING A RANDOM DOT STEREOGRAM
-
- The general idea is to stare at the stereogram and force your
- eyes to focus behind the stereogram until the image appears.
-
- When doing this, double images will appear until your brain locks
- in on the image.
-
- You might want to practice doing this with your eyes a bit to get
- a feel for how to control your eyes in this way.
-
- The stereograms produced by this program each have two boxes
- along the top of the image. These are placed in the center of
- the image exactly pattern width apart (or the width of the strips
- in the stereogram apart). These can be used to help focus your
- eyes at the correct distance. What you want to do is adjust your
- focus until you see three boxes (the center dot will be two boxes
- overlapping). When you can see three boxes, concentrate on
- holding the image of the three boxes steady. Once this is
- pretty stable shift your view down to the rest of the image,
- concentrating on keeping it in focus.
-
- If the boxes are too far apart or too close together you will
- have a difficult time bringing the image into focus. Try to
- select pattern width values which position the boxes about 2
- inches apart.
-
- You might want to practice shifting focus from your normal focus
- (two boxes) to the point where you see three boxes until you can
- do it without much thought.
-
- Many people find it easier to relax their eyes as one might do
- when day dreaming or thinking intensly about something to shift
- their focus.
-
- It may be difficult at first (and really difficult if you make
- the pattern width too wide or too narrow), but once you learn to
- do it you won't need the alignment boxes anymore. In fact, you
- will be able to view other things as stereograms. Computer
- keyboards are good subjects for viewing, just shift your focus in
- the same way as for the stereogram until the double image of the
- keys overlaps. Does it look more 3D when viewed as stereogram?
-
-
- EXAMPLE PCX FILES
-
- Several example PCX files are included for you to view. They are
- listed below with example viewing parameters.
-
- CONES.PCX (800 x 600)
-
- Pattern width -> 0 (let program make it up)
- Maximum elevation -> 0 (let program make it up)
- Maximum colors -> 256
- Random number gen seed -> 0
-
- Select SVGA256 and 800x600 resolution.
-
-
- TREX.PCX (320x200)
-
- Pattern width -> 40
- Maximum elevation -> 40
- Maximum colors -> 256
- Random number gen seed -> 0
-
- Select SVGA256 and 320x200 resolution
-
-
- CREATING YOUR OWN STEREOGRAMS
-
- Because the program can use standard 256 color PCX files, you can
- create your own stereograms with almost any paint program or any
- program that can generate 256 color PCX files. Make sure that
- you save the files in 256 color format, the program cannot
- handle monochrome or 16 color format files.
-
- Start with simple shapes like rectangles and circles of
- different colors. Then move on to more complex shapes.
-
- The dinosaur example PCX file (TREX.PCX) was generated by
- scanning an image from a coloring book into the computer in black
- and white and then coloring the image in a paint program to
- create the different depth levels. (We actually faxed the
- picture with a standard fax machine to a FAX/MODEM).
-
- For those with programming skills, you might try generating RAW
- format files (see below) from mathematical formulas.
-
-
-
- *** TECHNICAL INFORMATION ***
-
-
- RAW FILE FORMAT
-
- The RAW file format is specific to this program (although its
- pretty simple so others may inadvertantly be using it as well)
- and is used to store a depth map from which to generate a
- stereogram.
-
- This file format is used for two reasons: 1) in many PCX files,
- the encoding continues beyond the end of a single line making it
- difficult to read on a line by line basis, and 2) PCX files are
- more difficult to generate. This format should be selected if
- you decide to write a program to generate a depth map for display
- by this program.
-
- A RAW file consists of a short header which contains the width,
- length, maximum elevation, and data size for the depth map.
- Following the header is width * length * data size bytes which
- make up the depth map.
-
- In C notation, the header is defined as follows:
-
- struct
- {
- int
- Width,
- Length,
- DataSize,
- MaxElevation;
- }
-
- At this time the DataSize must be either 1 or 2, indicating
- either a 1 or 2 byte integer. While a data size of 2 should
- theoretically work, it has not been tested because depth values
- beyond 256 don't seem useful (in fact depth values above 50
- really don't either).
-
- MaxElevation SHOULD be set to the maximum value of the depth data
- as it is used when scaling the depth values when plotting.
-
-
- PROGRAM DETAILS
-
- This program is written entirely in C and compiled with the
- Borland C++ V3.1 compiler. All plotting to the screen and
- printers is acomplished through the use of BGI drivers.
-
- The BGI printer drivers were obtained from Ryle Design, P.O. Box
- 22, Mt. Pleasant, MI, 48804, (517) 773-0587.
-
- The BGI graphics drivers for the 16 and 256 color SVGA modes are
- from Jordan Hargrave, 1615 Burnley Road, Charlotte, NC, 28210,
- (704) 553-2332.
-
- Just how did I get BGI to load 7 user drivers? Hack, hack,
- hack...
-
-
-
- BIBLIOGRAPY
-
- _Random Dot Stereograms_ by Andrew A. Kinsman. Copyright 1992
- by Andrew Kinsman. Published by Kinsman Physics, P.O. Box
- 22682, Rochester, NY, 14692-2682 ($17pp). ISBN 0-9630142-1-8
-
-
-
-
- Copyright (c) 1994 by Derry Bryson. All Rights Reserved.
-
- No part of this document may be reproduced in any form without
- specific written permission of the author.
-