GenerateRandomSearch

Random-Dot Stereogram Generator

A random-dot stereogram looks like noise until you relax your eyes and a shape floats out of it. Each eye sees a slightly different part of the pattern, and where the dots repeat at a shorter distance the brain reads them as nearer. This makes one from a raised square, a disc, a ring, a pyramid, steps, a word, or a grey-scale depth picture you choose, which is read in your browser and never uploaded. Every pair of dots that should match is checked afterwards, and the hidden shape can be shown for anyone who cannot see stereograms.

What this generator does

Turns a depth map into a picture of random dots in which each pair of points the two eyes should fuse is the same colour, spaced closer for nearer parts of the shape. It shows the dot pattern, can show the depth map instead, and prints the picture at the width it was designed for where the paper allows.

How to use this tool

  1. Choose a hidden shape, type a short word, or choose a depth picture where light areas come forward.
  2. Set the size, the eye separation and the dots, and press Make the stereogram.
  3. Look at the picture with your face close, relax your eyes as if looking through it, and move slowly back. Press Show the hidden shape to check what is there.
  4. Use the dot code to make the same picture again; print it from the print button.

Understanding the controls

Hidden shape
Six built-in shapes, including steps at three depths and a smooth pyramid, words in block capitals, or a picture of your own: light is near and dark is far, unless you swap them. Pictures are read in the browser and never leave it.
Width and height
300 to 1200 pixels wide. The picture needs to be at least three eye separations wide to give enough repeats to fuse.
Eye separation
120 to 320 pixels: how far apart the background repeats are, roughly. 240 suits a laptop at arm's length; smaller is shallower and easier to see.
Dots and code
Black and white, soft greys or colour. The code is the seed for the random dots; the same code with the same shape and settings makes the same picture again.

Worked examples

A floating disc, 720 × 420 pixels, eye separation 240
The background repeats every 120 pixels and the nearest point of the depth range every 96; the disc, at 0.8 of the range, repeats every 102. Every one of the eye pairs in the picture matches.
Printing
At 240 pixels to an eye separation of 63.5 mm, a 720-pixel picture is designed to print 191 mm wide. A4 with 15 mm margins has 180 mm, so it prints at 180 mm and the depth looks a little shallower; the sheet says so.

Common use cases

  • A science lesson on how two eyes judge depth
  • Hidden-word puzzles and cards
  • Turning a depth map from a 3D program into a stereogram
  • A wall poster or a puzzle page

How this generator works

For every pixel, the two points the left and right eyes would fuse on the page are a separation apart that shrinks as the point comes nearer: separation = (1 − μz) × E ÷ (2 − μz), where z runs from 0 at the background to 1 at the nearest point, E is the eye separation and μ, a third, is the depth of the scene. Every such pair is constrained to one colour; the constraints along each row are joined into chains, and each chain takes one random colour from the seeded generator. This is the published random-dot method of Thimbleby, Inglis and Witten, used here without hidden-surface removal, so every constraint whose points both fall in the picture is met. The check then works every pair out again from the depth map alone and confirms the two dots are the same colour, without looking at the chains.

Randomness and fairness

Only the dot colours are random; the shape and the spacing of the repeats are fixed by the depth map and the eye separation. With no code a fresh one is drawn from the browser's secure generator; with a code the dots come from a seeded sequence, so the same code, shape and settings repeat the picture while the generator is unchanged. The code is for reproducibility, not secrecy.

For how randomness is produced across the whole site, see how Generate Random works.

Assumptions this tool makes

  • Wall-eyed (parallel) viewing, the usual way: looking through the page. Cross-eyed viewing shows the shape sunk in instead of raised.
  • An average adult eye separation of 63.5 mm when deciding how wide to print.

Limitations and good to know

  • No hidden-surface removal: around sharp edges a small amount of the pattern can be shared by both surfaces, which can blur edges slightly.
  • Random dots only; patterned or picture-textured stereograms are not made.
  • Not everyone can see stereograms; it depends on how the two eyes work together, not on eyesight, and the hidden shape can always be shown instead.

Common mistakes

Trying to focus on the dots
Look past the page. Starting close up and moving slowly back is easiest; a reflection in a glossy print or screen can help as a far target.
Using a photograph as the depth picture
A photograph's brightness is not depth. Use a grey-scale depth map, or a simple drawing in shades of grey with soft edges.
Too many letters
Words of three to six letters fuse best; long words make each letter too small to see as a shape.

Practical tips

  • Greys are gentler on the eyes than black and white for long viewing.
  • Shapes with large flat areas, like the steps, are easiest to see at first.
  • Keep the dot code to make the same picture again for a class or a puzzle sheet.

Privacy and your data

The picture is made in your browser. A depth picture you choose is read there and never uploaded, and the words you type are not sent anywhere. Usage counts record only that a stereogram was made.