Cost: $0-100
About These Ratings
Difficulty: Easy; no special skills needed. Danger 1: (No Hazards) Utility:

------------------------

More about Random-Dot Displays, Plus Computer Programs to Generate Them

---------------------

by Jearl Walker
November, 1980

---------------------

MY DISCUSSION OF RANDOM-DOT DISPLAYS in April elicited many comments from people who had devised variations on the experiments. Here I shall describe several of the new experiments. And for the amateur who owns or has access to a home computer I shall present a program for generating random-dot displays.

In my April article I described random-dot displays in which circles, spirals and other nonrandom forms could be perceived. The first step in generating a display was to sprinkle paint on a sheet of paper. A transparent copy of the resulting pattern was made and laid over the original. If the two displays had the same scale and were aligned carefully, the experimenter saw nothing unusual. If one of the displays was rotated around a point, however, concentric circles appeared (formed by pairs of correlated dots). In some trials the transparency had a scale different from that of the original; rotating it over the original then gave rise to spirals. A variety of nonrandom forms could be created by choosing different scales and angles of rotation.


Figure 1: A pattern developed by Leon Glass's superposed-color method

I had characterized the circles and spirals as illusions. Several readers corrected me by pointing out that the forms are not illusory but real (as a result of juxtapositions of the two displays). A better term for what is seen is therefore perception.

Some of the most extensive investigations of such perceptions have been conducted by Leon Glass of McGill University. He prefers to call the effects random-dot moiré patterns. In one variation of the basic setup he lays a random-dot pattern over its own negative. The original consists of black dots on a white or transparent background, the negative of white dots on a background of halftone gray. When Glass rotates the top sheet, petal-like patterns (rather than circles) appear. Apparently circles are generated only when the contrast between the dots and the background is similar; arrays with dissimilar contrast yield the petals.

In another experiment Glass generates a random-dot display by splattering black paint on white paper and making a negative image of the result; he then has the original printed in yellow and the negative in blue by a photographic silk-screen process. When these prints are superposed and rotated, circles appear. Glass then repeats the experiment but reverses the colors. This time superposition and rotation yield petals.

Several people have written to me about applications of the moiré patterns. One of the most interesting letters came from Edward B. Seldin of the Harvard School of Dental Medicine and the Massachusetts General Hospital. In oral and maxillofacial surgery Seldin must correct certain types of deformity by moving parts of the facial skeleton. He traces the anatomy of a patient from X-ray photographs and then studies the possibilities for change. In many cases he seeks the one axis around which part of the facial skeleton can be rotated to accomplish the change.

To determine that axis Seldin has devised a new technique based on random dot moiré patterns. He traces the fixed skeletal parts on a background array of random dots. On a transparent sheet having the same array of dots he traces just the movable skeletal parts. When the transparent sheet is carefully lined up with the other drawing, the random dots are aligned. Seldin then rearranges the movable parts by sliding the transparent sheet over the other drawing. The unique axis of rotation for the particular rearrangement he has just achieved with the drawings is neatly indicated by the circles that appear in the overlapping random-dot arrays. The rearrangement could be made by rotating the movable part around the point that was the center of the circles.

The illustrations in Figures 2 and 3 demonstrate Seldin's technique. He began by tracing the contours of a patient's hard and


Figure 2: Uncorrected facial structure with a random-dot pattern superposed by Edward B. Seldin

soft tissues and certain landmarks based on an X-ray plate. The patient had an open bite and a protruding lower jaw. Seldin made a tracing of just the upper part of the facial anatomy and superposed on it a random-dot display. The tracing was done on acetate, and the dot array was the one made by A. G. Klein that I showed in April. Seldin also made a tracing of just the lower facial anatomy superposed on the same random-dot display.

Figure 2 shows the upper and lower facial parts aligned as they were in the patient. Notice that the overlapping random-dot displays do not reveal any particular ordering of the dots. In the next illustration Seldin has moved the transparency of the lower anatomy so that the teeth meet properly and the lip contour is improved. The axis of rotation for this correction lies at the center of the circles that can be perceived in the dot arrays.

This new technique can aid Seldin in planning for the actual surgery. For example, he could cut the ramus (ascending part) of the lower jawbone to give it the radius of curvature that would enable the bones to slide over each other until the correction is made. Alternatively he could make the correction by cutting and removing an appropriate amount of bone in the lower jaw.

Seldin says the exact location, size and shape of the osteotomy (the removal of bone) can be determined by drawing a line extending from the rotational axis and then rotating it through the same angle as in the rotation of the dots. I find this practical application of random-dot arrays exciting.

Philip Garrison of Montreal wrote to me about how he worked with a Xerox copying machine to produce circles and spirals in a random-dot array. He made a Xerox copy of a blotter from a technician's desk and ran the copy through the machine after turning the blotter slightly from its original orientation. When the paper emerged, it bore two copies of the blotter, one rotated from the other. The copied arrays of random dots gave rise to circles.


Figure 3: The correction suggested by moving superposed patterns

On some copying machines a copy is reduced in scale from the original. With such a machine you can get spirals or "sunbursts" in the random arrays. Make a copy of something like the blotter Garrison had. Replace the blotter with the copy and make a second copy. Replace the first copy with the second copy and produce a third. The third copy is reduced in scale from the first. To get the two patterns on the same sheet insert the third copy in the machine while again reproducing the first copy.

Guy Ottewell of Furman University suggested that one of the best moiré effects can be created by putting a large halftone picture under its negative. If the two are carefully aligned, the entire area is black because each transparent area on the negative is matched by a black area on the print. Any slight misalignment gives rise to a relatively white area. If you slide the negative over the print, the white area skims the surface.

A clever version of this technique was sent to me by Joe Huck of Irving, Tex. He had originally sought to create a pattern of elements that were randomly spaced but did not vary much in density. He had been working with arrays of dots that, when one was laid over the other, generated moiré patterns of aligned rows of the dots.

To create a pattern of only one image he modified his procedure. He made a photographic print of a series of dots. With a quarter-inch circular punch he removed circles from the print in such a way that each circle held one dot. He glued the circles on paper with their edges touching; the result was a triangular array of the circles.

When the triangle was several inches long on each side, Huck photographed it with high-contrast film. Only the dots


Figure 4: The apparatus devised by Joe Huck to make star patterns

appeared in the negative. From the negative Huck made many prints, which he pasted together in a triangular array that he photographed with a reduction of 50 percent. The product, which was some 8 by 10 inches in size, had a pattern of dots with an average spacing of an eighth of an inch.

Huck made three more transparencies with a pinhole camera in which this pattern of dots formed the pinholes. A light was shone into the camera through a panel consisting of a clear glass plate and a plastic sheet to diffuse the light. On this panel he put a ruby-colored transparent film from which he had cut a large star so that the resulting photograph would consist of stars.

Near the other end of the box Huck placed a glass photographic plate bearing a copy of the dot array. The dots functioned as pinholes, each casting an image of the star onto a piece of photographic film at the far end of the box. The developed film (a negative) was the second of the transparencies he sent to me, the original array of dots being the first.

In his third transparency, which was a contact print of the second, the black and white were reversed. A fourth transparency was like the second but had overlapping stars. The size of the stars on the second, third and fourth transparencies was governed by the position of the glass photographic plate. Although the patterns varied somewhat in size, the spatial dimensions of the arrays were all proportional because they were all generated by the same array of dots on the glass plate.


Figure 5: One of Huck's patterns

When I lay Huck's first transparency over any of the others (either on a light table or against a large window) and adjust the alignment, an image of a large star appears. Huck recommends combining the first and fourth transparencies. Although the individual star elements in the fourth one are obscured by overlapping, a large dark star image is nonetheless quite apparent in the combination. Overlaying the first and third transparencies generates a large white star. The result of overlaying the second and third transparencies is an image that resembles a large spider web.

Henry M. Gerstenberg of the National Bureau of Standards sent me two photographs of buttons. The first one shows a collection of buttons that he photographed with high-contrast film. With the negative he produced the second photograph, in which the rotation of the buttons creates a circular pattern like the ones resulting from the rotations I have described in the random-dot displays.

R. N. O'Brien of the University of Victoria described to me how he applied the rotation technique to investigating an array of humps on the surface of a salmon egg. When the egg is fertilized, the sperm approaches one of the humps. The humps are in a hexagonal array and appear to be similar. Nevertheless, the sperm favors a particular hump in a collection that is about three hexagons in diameter. How that particular hump differs from the others is the subject of O'Brien's investigations.

To study the regularity in the hump patterns O'Brien made large transparencies of electron micrographs of the egg surface. The magnification was some 2,300 diameters. He overlapped two identical transparencies and rotated one of them. With a rotation of about 15 degrees he observed a structure in the transparencies that was about three diameters larger than the unit hexagonal array. This size (about 15 micrometers) was approximately equal to the length of a straight line that could be extended through the humps on the surface of the egg. O'Brien suggests that small-scale ordering in seemingly random arrangements might be studied in a similar way. As examples he puts forward the possibility of examining "such diverse things as patterns in feeding flamingos, grazing antelope, shoppers in a bazaar and people in a mob."


Figure 6: How extraneous images from a television display are built up on the retina

Some of the moiré patterns studied by Glass can be generated on a home computer. The table below sets forth a program that I employ to create circles or spirals similar to the ones that appear when I overlay identical patterns of random dots and then rotate one of them. The program is written in Level II Basic for a TRS-80 microcomputer system, which should be easy to modify for any variation of the Basic computer language. (In the illustration there are blanks between the commands for ease of reading, which should be eliminated so that the lines are compressed when the program is entered into the computer.)

I shall briefly explain first how the program works and then what it causes to be displayed on the monitor screen of the computer. Line 10 clears the screen, sets a value for PI and the conversion (DR) of degrees to radians. (The trigonometric functions in Basic require radians.) The next two lines ask (1) how many spots should be displayed, (2) how much of a rotation should be between the two identical displays that will be generated and (3) whether the second display should be shrunk in relation to the first. Without shrinkage circles appear; with shrinkage spirals appear.

The X and Y coordinates for a random spot (labeled K) are chosen on the screen through the pseudorandom generator RND on line 40. (The computer considers the upper left-hand corner to be the origin of an X-Y coordinate system. The X axis extends to the right, the Y axis downward.) Then the program calculates the horizontal distance XX and the vertical distance YY between the randomly chosen spot and the center of the screen. Lines 60 through 90 assign an angle T(K) to the spot on the screen. The distance from the spot to the center of the screen is computed and called R(K). The last part of line 100 allows for a shrinkage factor to make the spirals. The program repeats the procedure of locating a randomly chosen spot and assigning it an angle T(K) and a distance R(K) until it has assembled the number of spots you wanted.

In line 120 the screen is cleared of the questions, the desired rotation is put into radians and the machine prints an asterisk at the center of the screen and (in the upper left-hand corner) the rotation (in degrees). The random-spot array is turned on by the SET command in line 130. The program finds a partner for each random spot in such a way that the partner is rotated about the center of the screen by the angle you chose. The X and Y values for the second spot of each pair are computed in line 140; the values are rounded off in line 141. If the location of the second spot is off the screen, the program is told to go to the next spot in the initial random array. If the second spot is on the screen and a spot is not already displayed there, the program turns on the second spot of the correlated pair.

The procedure is repeated until each of the spots in the initial random array of spots has a partner (provided it is on the

10 CLS: PI=3.1416: DR=.01745
20 INPUT "NUMBER OF DOTS"; D: INPUT "SHIFT ANGLE (DEG)"; DD
30 INPUT "SHRINKAGE (%)"; S: DIM X(D), Y(D), R(D), T(D)
40 FOR K=1 TO D: X(K)=RND (127) : Y(K)=RND (47)
50 XX=(X(K)-64)/2: YY=Y(K) - 24 60 IF XX=0
GO TO 110 ELSE T(K)=ABS( ATN(YY/XX) )
70 IF XXX AND YY=l THEN T(K)=PI - T(K)
80 IF XXX AND YYX THEN T(K)=PI + T(K)
90 IF XXl AND YY<=0 THEN T(K)=2*PI - T(K)
100 R(K)=SQR ( XXl2+YYl2): R(R)=R(K)*(1 - S/100)
110 NEXT Y
120 FOR J=1 TO 15: CLS: DT=DD*J*DR: PRINT Q 544, "*";: PRINT @ 0, DT/DR;
130 FOR K=1 TO D: SET (X(K), Y(K)) : NT=T(K)+DT
140 NX=64+2*R(K)*COS(NT) : NY=24+R(K)*SIN(NT) 141 NX=INT( NX+.5) : NY=INT( NY+.5)
150 IE NXX OR NX OR NYX OR NYg GO TO ;70
160 IF POINT (NX, NY) THEN GO TO 170 ELSE SET (NX, NY)
170 NEXT K
180 FOR L=1 TO 400: NEXT L
190 NEXT J
200 GO TO 200

A program for rotafing a random-spot display on a home computer

10 CLS: INPUT "NUMBER OF DOTS"; D: DIM X(D), Y(D)
20 INPUT "SHIFT SIZE=? ANSW IN X, Y"; SX, SY:CLS
30 IF SX=0 THEN N=0 ELSE N=1
40 IF SY=0 THEN M=0 ELSE M=1
50 FOR K=1 TO D: X(K)=RND(127): Y(K)=RND(47) : NEXT K
60 FOR J=1 TO 15: CLS:PRINT @ 0,J;
70 FOR K=1 TO D: X=X(K) - (SX+J)*N: Y=Y(K) - (SY+J)*M: SET (X(K), Y(K) )
80 IF XX OR YX GO TO 100
90 IF POINT (X,Y) THEN GO TO 100 ELSE SET (X,Y)
100 NEXT K
110 FOR L=1 TO 400 : NEXT L
120 NEXT J 400 GO TO 400


A program for shifting a random-spot display horizontally and vertically

screen) that is rotated around the center by the chosen amount. Once all the pairs are turned on line 180 provides time for you to examine the screen. If you want more time before the screen is erased, change the 400 in that line to a larger number.

After one rotation the program erases the screen and turns on the initial array plus the same display rotated through twice the angle you originally chose. Again you have a chance to examine the screen before the program shows further rotations. The number of rotations is controlled by the 15 in line 120. If you want more rotations or fewer, change the 15. When the machine has completed the last rotation, it cycles in line 200 until you push the BREAK key. Up to that point the last rotation is held on the screen. The spots on the screen are really small rectangles half as wide as they are high. Therefore I must include scaling factors in the calculations: the division by 2 in the first part of line 50 and the multiplication by 2 in the first part of line 140.

To check the program I run it with one spot, an initial rotation of two degrees and no shrinkage. The circling around the center is usually easy to perceive. Once I am sure of the program I run 100 or 200 spots with the same initial rotation of two degrees and no shrinkage. The circles appear first on the outer edges of the screen and then, as the rotation is increased during the running of the program, they move toward the center, leaving a random muddle of spots on the outer edge. After a rotation of 10 degrees or so the perception of circles in the array is lost. I am not certain at what point I last perceive circles, since they seem to disappear slowly.

I have designed the program so that a spot and its partner are printed successively. In the early stages of the construction of a newly rotated pattern a correlated pair probably will appear in a 9 rather isolated area of the screen. Their rotation from each other is easy to perceive. Soon, however, more and more spots are created around them and perhaps even between them, and the perception becomes progressively more difficult.

To introduce shrinkage into the patterns enter a value for the percent shrinkage (S) when the program asks you about it in the beginning stages of running. A value of zero produces no shrinkage. A value of 5 produces a shrinkage of 5 percent between the initial random-spot pattern and the rotated one. At the smaller angles of rotation and small shrinkages spirals appear in patterns on the screen. With either large shrinkages or large rotations the spirals usually disappear.

A peculiar image materializes if the shrinkage is about 10 percent and the rotation is zero. (Enter O when the program asks you for the rotation angle.) The screen appears to place you at the end of an infinite "cylinder" of stars, something like the patterns employed in films to give the audience the sensation of traveling through the stars at great speed.

The program presented in the lower portion of the above table causes a linear translation of a random-spot array on the TRS-80 screen. The program asks how many spots are desired. Then you decide whether the motion is to be strictly horizontal or vertical or if it is to include both directions. Line 70 causes the randomly selected spots on the screen to turn on and computes the shifted partner for each of the originally selected spots. The partner is then turned on in line 90.

When all the partners are found and displayed, the program gives you a delay in line 110 so that you can examine the screen. Then the screen is erased and the original random spots and the new partners, now further shifted, are turned on. This procedure is continued for 15 shifts of the size that you enter in answering the question on line 20. If you want more or fewer shifts, change the 15 in line 60 correspondingly.

In the early stages of the shifts the array on the screen develops a noticeable pattern that betrays the direction of the shift. The fewer spots there are on the screen, the more apparent the shift direction is. By appropriately selecting the initial shift you can cause the array to shift straight to your left, straight upward or at an angle toward the upper left. After several shift cycles the pattern in the random array begins to disappear. Too many of the correlated pairs of spots then have other spots between them or next to them, so that the visual process can no longer pick out the correlated pairs. Shifts thereafter do not noticeably alter the array on the screen. Each shift goes from one random array to another.

As with the other program, a pattern is more easily perceived in the array when the density of spots is relatively low. Nevertheless, I usually run this program with from 100 to 200 spots in the original pattern. In each shift cycle the screen is cleared and then the correlated pairs (one original spot and its shifted partner) are displayed. In this early stage of the cycle the direction of shift is easy to pick out. Later, however, it becomes much harder or even impossible to perceive because of the larger density of spots.

Several changes can be made in an investigation of the random-spot patterns on a home computer. My TRS-80 monitor has a black-and-white display. If your home computer has a color monitor, you might modify my programs so that the spots and the background on the screen appear in color. Then you can do some of the experiments Glass did with colored arrays.

Can you arrange the colors so that with one choice a rotated array on its original gives rise to circles but with an interchange of colors the circles do not appear? Several of the other brands of home computers have a better resolution on the screen than mine, which may make the perception of linear shifts or rotations much easier.

You may want to try one of Glass's random-dot patterns. The pattern is not rotated but is expanded in one direction (say horizontally) and contracted in the other (vertically). Readers experienced with home computers can doubtless modify my programs so that they run faster and perform various new tricks. I would welcome letters about any modifications.

A peculiar visual effect can be seen if you quickly swing your view across a television screen in an otherwise dark room. For example, if you stand about six feet from the screen, starting your view about a foot to the left of the screen and rapidly shifting it equally far to the right side of the screen, you will probably see an image of the picture on the screen "floating" in midair off to the right of the screen. The extra image will be slanted, with its top displaced to the right from its base. The image may have the same amount of detail as the picture on the screen. If you move your view through a larger angle (and perhaps adjust your distance from the screen), you may see several of the ghost images off to the right, although the ones at each end of the series may be incomplete. If you move your eyes in the opposite direction, the ghost images appear to the left of the screen. They are similar to the ones at the right except that they lean in the opposite direction.

I believe this effect was first reported by T. G. Crookes in 1957. He explained it in terms of the way the picture is created on the television screen and the position at which the image is formed on the retina as the eyes sweep across the screen. A television picture is built up by an electron beam that moves across the screen, exciting phosphors that emit light when they drop to lower energy levels. The beam is swept horizontally across the screen line by line until it reaches the bottom. The sweep is so rapid that the viewer is unaware of it.

Suppose that as you begin to move your view across the screen from left to right the beam has begun filling in another picture, starting at the top of the screen. The line that is generated just then falls on your retina at a position labeled AB in the illustration below. The creation of the picture continues as you shift your line of view. Soon the bottom line of the picture is generated, but it does not fall on the same place on the retina because the view has been moving. Instead it occurs at CD. This position is actually to the right of AB on the retina, but your brain interprets it as being to the left. (The brain reverses left and right as well as up and down when it interprets what you are seeing.) The image, which lies to the right of the screen because of your rotated view, is a parallelogram, with its top shifted to the right from its bottom.

If you shift your view quickly enough and are at an appropriate distance from the screen, you may see another ghost image. The first one is off to the right and the second one is between it and the screen. The second image is created by the next projection of a picture on the screen. The first line of this new picture falls on the retina to the right of the first image (at a place labeled EF in the illustration). The last line falls at GH. Your brain interprets this new image as a parallelogram, slanted in the same way as the first image.

If you repeat the observations at a greater distance from the screen but keep the rate at which you rotate your view the same, you will find two changes. The ghost images are smaller because the television screen occupies a smaller angle in your field of view. They are also tilted more. This second effect is a result of the first. Because the images are smaller the top and bottom lines of each image are also smaller. Since you are shifting your view at the same rate as before, the shorter image of the bottom line means that it will be more displaced from the image of the top line than it was in the observations made closer to the screen. Hence the image you see is more tilted.

At sufficiently close distances the ghost images will overlap because of inadequate separation of the images on the retina. At larger distances the images may be well separated but too small for you to see the details of the picture that had been built up on the screen. When multiple ghost images are observed, the one closest to the screen will be less clear than the others because it arises from an image that falls well off the visual center of the retina.

To maintain the rate at which you sweep your eyes across the screen you can follow Crookes's suggestion of mounting small luminous objects in the plane of the television screen but off to the sides. Sweep your view from one to the other. If you move away from the screen but want to maintain the same sweep rate, move the luminous objects farther to the sides so that the angle between them in your field of view remains the same.

When you move your eyes rapidly up or down, the screen produces less dramatic ghost images. If the motion is downward, a bright, squashed image of the picture appears below the screen. Upward motion yields a fainter image (above the screen) that is elongated vertically. The images are produced in the same manner as the more dramatic ones. The difference in their height is a function of the way the picture is built up on the screen. The line sweep begins at the top and moves to the bottom. If you move your view downward, the images of the top and bottom line in the picture are relatively close on your retina, giving you a squashed image of the screen. If you move your view upward, the images of the two lines are relatively far apart, producing a vertically elongated image.

Most other luminous pictures will not yield this effect because they lack the rapid creation and disappearance of the picture. For example, if you sweep your view across a motion-picture screen, you will see only blurred streaks to the side. The entire picture in a frame of a motion-picture film is projected simultaneously. The visual effect appears only when, as in television, the individual elements of illumination in the picture turn on and off rapidly.

 

Bibliography

TELEVISION IMAGES. T. G. Crookes in Nature, Vol. 179, No. 4568, pages 1024-1025; May 18, 1957.

PATTERN RECOGNITION IN HUMANS: CORRELATIONS WHICH CANNOT BE PERCEIVED. Leon Glass and Eugene Switkes in Perception, Vol. 5, No. 1, pages 67-72; 1976.

FLOATING TV PICTURES. Jearl Walker in The Flying Circus of Physics with Answers. John Wiley & Sons, Inc., 1977.

PHYSIOLOGICAL MECHANISMS FOR THE PERCEPTION OF RANDOM DOT MOIRÉ PATTERNS. L. Glass in Pattern Formation by Dynamic Systems and Pattern Recognition, edited by H. Haken. Springer-Verlag, 1979.

Suppliers and Organizations

The Society for Amateur Scientists (SAS) is a nonprofit research and educational organization dedicated to helping people enrich their lives by following their passion to take part in scientific adventures of all kinds.

The Society for Amateur Scientists
5600 Post Road, #114-341
East Greenwich, RI 02818
Phone: 1-877-527-0382 voice/fax

Internet: http://www.sas.org/