How to play tricks with dots ._ _._ ~~ ~... ,

,.. ._..-.------_._-----NEW SCIENTIST How to play tricks with dots Posters with hidden 3D images will soon be with us. But how do the designers cre...
Author: Juniper Beasley
23 downloads 3 Views 2MB Size
,..

._..-.------_._-----NEW

SCIENTIST

How to play tricks with dots Posters with hidden 3D images will soon be with us. But how do the designers create the picture from what looks at first sight like a meaningless pattern? Harold Thimbleby and Claire Neesham

;

i

.!

.j.

..

1

:

WALK through any craft market over the next few weeks, and among the T-shirts and earrings you are likely to see some strangely colourful posters that look at first sight like a random pattern of dots. No, it's not someone oying to unload a batch of third-rate art_ These posters are practically guaranteed to draw the crowds: don't be surprised if out of the blue someone shouts lilt's a dinosaur!" or "Look, the Statue of liberty-wow. amazing!" There is something special about these pictures after all. } The posters causing the excitement are autosrereograms. At first sight they are a meaningless jumble of dots, but when they are viewed correctly a convincing three-dimensional image springs out. Autostereograms are already a cult art form in Japan. where several million books containing these images were sold last year. and a similar phenomenon is sweeping the US. In Europe the ball is ready to roll with the publication next month of a compilation of images. A flood of merchandise and advertising exploiting 3D images seems certain to follow. So what makes autostereograms so captivating? The 3D 26

images are formed from nothing more complicated than overlapping patterns of dots generated by a computer program. But gaze at them for long enough and the dots merge to give a 3D effect that according to Tom Biccei, president of N. E. Thing Enterprises, elicits a "child-like glee" in adults seeing it for the first time. It was Biccei and his Boston~based company that brought autostereo~ grams out of the laboratory and onto the street. Autostereograms rely for their effect on viewers being able to deconverge their eyes-to "uncross" them-at the same time as focusing on a near point. This usually requires some practice; and Biccei says a big attraction of autostereograms is the sense of achievement people

d&.

.~ ~~ ...

9 October 1993

"'j

:':f

~?

.'

f

~.

1---'

.

,"

f

...

-

I

NEW

SCIENTIST

have when they first see the image. They may have to persist with an autostereogram for several hours before the 3D effect jumps out. but once they have seen it the effect becomes sharper the longer they look at it. Once people have picked out the 3D image in one autostereogram. they are usually able to see other 3D images quite quickly. Any method of creating an artificial 3D effect has to trick the hrain with effects that mimic those produced hy viewing real, solid objects. The pupils of an adult human's eyes are about 7 centimetres aparr. So each eye has a slightly different viewpoint and sees a slightly different image. Close one eye and then the other. and you will notice that nearby objects seem to shift to the right when viewed with your left eye and to the left when viewed with your right eye. When you focus on the object with both eyes open, your eyes turn towards it. The brain fuses the rwo slightly different images together to make a single image that gives the impression of being a solid. The fusing of these images is called stereoscopic vision. This process differs from seeing perspective. With perspective a feeling of distance is giving using different sizes and vanishing lines. The resulting effects are the same for both eyes.

Special effects Like many breakthroughs, autostereograms stem from experiments that took place in the New Jersey resarch centre of the Bell Telephone Laboratories. In 1959 Bela Julesz, who headed a vision research team. found that if a 3D image. such as a square floating over a flat surface, was represented by two separate patterns of dots-one for each eye-a 3D effect could be seen through a device called a stere. oscope. This device had been invented more than a century earlier by the British physicist Charles Wheatstone, who had designed it to produce a 3D effect when used to view pairs of specially drawn pictures, one for the left eye and one for the right. Julesz's dot patterns, which are known as "random dot stereograms" due to the random assignment of colours, are often seen as a landmark in the understanding of vision. They demonstrated that stereoscopic vision does not depend on recognition of shape, and proved that some illusions are created after the two eyes', images have been fused in the brain, rather than as a result of effects in the retina. In 1990 Christopher lYler and Maureen Clarke of the Smith· Kettlewell Eye Research Instirute in San Francisco described a computer algorithm that allowed a pair of "random dot stereograms' to be combined by overlaying the rwo separate dot patterns. To get an idea of how their method works, imagine looking out of a window at a still object such as a sleeping cat, and then drawing an image of the cat on the window, first with the right eye shut and then with the left eye shut. The result is rwo slightly overlapping images, which when viewed with both eyes looks like a cat-even though the real cat has moved into the next-door garden. With autostereograms these two images are formed from hundreds of tiny dots, and calculating the correct positioning for Seeing is believing: the pattern (opposite top) is an autostereogram of the picture (left). For the best effect ·uncross· your eyes, while focusing on the pattern. Putting a sheet of glass in front of the image and catching your reflection may help the viewing process

1: Ways of seeing FOR cenruries, artists russled. with perspective, ll}'ing to provide visual clues to relative distances by using shadows, overlaying objects, and expetfmenting with textures. But in the 15th century, artists such as the Italian painter Carlo Crivelli began to solve the problem using geometric perspective. Conveying a realistic impression of a solid from a flatimage has proved a tougher problem. An early attempt came more than 160 years ago wi~ the British physicist Charles Wheatstone and his stere6scope~ Shaped rather like a pair of binoculars, the stereoscope was designed to presem the viewers' eyes with two specially drawn images, each one. a slightly differem version of an object, corresponding to the two views of a real object that are seen by the left and right eyes. As with the real object, the brain can fuse these images to produce a 3D impression. Cumbersome as this method of viewing 3D images may seem, the stereoscope caused quite a stir in the Victorian era, and even Queen Victoria was amused by it. Since then a Dumber of 3D techniques requiring. more modest viewing equipment have emerged. One of the most memorable is the use of red and green filters. Uke the stereoscope, this approach relies on each of .the viewer's eyes seeing a slightly different image., This ~ achieved by printing one of the images in green and Jhe orper in red and viewing the specially produced 'picru're tl!rough "3D' specs"-pieces of spectacle-shaped card with one red fil· ter and one green. The eye looking through the ted filter then cannot see the parts of the pietu!)'.thaiare printed in red, and sees'the green elements:of.the picture as a black image; similarly, the other.eye,sees only·the red elements of the picture, also in black. The biain combines the two black images to give a monochrome 3D effect. This approach to producing 3D images caught on in the 1950s wben a number of 3D films were made, including classics such as House of Wax, ·Creature from the Black Lagoon and Dial M for Mur:der. Intefest in the genre resurfaced in the 1970s with Andy Watho!'s Frnnkenstein, and since then several companies have run 3D advertising campaigns in magazines, ·and a number of children's magazines have used the technique in speciaI features. Some artists and film makers also experimented with . holograms and polarised light to create full-eolour 3D images. In the case of holograms, the creation of the two images relies on the interference patterns created when coherent light, usually from a laser, passes through a fine mesh. Using this approach, colour images can be captured . on photographic film and viewed with the naked eye. . Polarised light can generate 3D images in colour. The prinCiple is the same as for the red and green 3D specs, except here one eye is covered with a vertical polarising filter and the other with a horizontal filter. The final picture is created from two imag~ne horizontally polar· ised and the other vertically. Each eye then sees only the light reflected from the image pOlarised' in the same ' direction as the filter it. is looking through. Both these techniques produce impressive effects, as can be seen by anyone visiting holographic art exhibitions or Disney's Epcot Center in Orlando, Florida, where polarised light is used to give the 3D.'effect·in Francis Ford Coppola's Captain Eo, in which Michael Jackson stars. One problem common to all these 3D effects is that they are difficult and expeg.sive to make and, unlike autostereograms, require.lase~, highiy speciilised'pho-.:. tographic techniques, or tailor·made viewing sYstems;' ....:.., , .. , -. 27

, NEW

them is a task for a computer. The

--.

first step is to create a 3D computer model of the image, which can be

SCI":NTI.ST

'"

done using standard software for 3D design. The geometric data from this model is then used to work out the depth of the image at various

points. Based on this information, the 1Yler and Clarke algorithm then gen-

"

",

erates dots that are close together

for pans of the image that appear

"

near to the viewer, and farther apart

for areas that are supposed to look farther away. The next step is to calculate a way to display these dots, something that is less straightforward than it might at first seem. The 1Yler and Clarke program places the dots from left to right on the paper (or screen), but in doing so it has to account for the fact that the images intended for the left and right eyes are at slightly diffetent places on the paper. To do this, the program copies the pattern intended for the left eye and moves it slightly to the right to form the image for the right eye. But as the program builds up the image, what used to be right eye's random dots become the components of the next pan of the image to be presented to the left eye, because the images overlap. This makes it difficult to wotk out what colour certain dots should be, so that the viewer doesn't see different coloured dots with each eye. It also means that it is virtually

draws a cat seen through a window. first with the right eye and then with the left. the resulting drawing on the glass is of two overlapping cats. These correspond to the two images needed for 3D vision

autostereogram generation is to create a 3D computer model.

But instead of placing the dots from left to right across the screen, always copying the left-eye image to generate the image for the right eye, this program starts by identifying all the dots that must be the same colour as each other. It then

assigns a colour randomly to those dots that will make up the right eye's image and those for the left, so avoiding misplaced dots and space filling. The images produced using this method are clearer than those produced by the 1Yler and Clarke method. For commercial suppliers of

impossible to use dots of more than two colours, as this would lead to complete

'The 3D images are

mayhem with pink dots appearing where the other eye expects to see

formed from nothing

orange, and so on. Most of the pictures

more complicated than

can also only be viewed in the upright position as the patterns are worked out

in horizontal lines.

overlapping patterns of

Calculating the difference

dots generated by a

The 1Yler and Clarke algorithm is used

computer program.

for the posters that are now commer-

cially available, and most of the time it creates a satisfactory 3D effect. with not

But g;p:e at them for long

too many dots in the wrong place. How-

enough and the dots

ever, there are some shortcomings to their computer program: it places some dots in a way that causes overlapping

merge to give a 3D effect'

images to interfere with each other, leading to echoes and ghost images. And as distance between the dots changes across the page, giving the impression of depth, breaks in the image may become visible. With the 1Yler and Clarke method these areas, which arise when dots need to be 4 millimetres apan rather than 2 millimetres for example, are filled with unrelated patterns. This method of space filling can be confusing to the viewer who may expect to see more of the image.

These problems are ovetcome by taking a slightly different approach developed at Stirling University by a group led by Harold Thimbleby. The group staned with one of the commercially available postets and then wotked out a new algorithm for producing 3D il)lages from first principles. As with the Tyler and Clarke approach, the initial step for this kind of 28

autostereograms this is likely to be a crucial consideration.

Autostereograms can be generated on an ordinary computer, displayed on paper, fabric or a standard TV screen of any size, and viewed with the naked eye. Their main limitation is that the

3D effect can only be a single colour, due to the way images are created. But Biccei believes that they will never· theless have a big impact on advertis-

ing. In 1991, while working in the US for a British company selling computer equipment, he saw a description of autostereograms in an obscure technical magazine. Using his personal computer, he generated an autostereo-

gram which was then incorporated into an advertisement that was placed

in an American trade journal. "We got a huge response," says Biccei, "and not only from people interested in our equipment." Following the excitement created by the advertisement, Biccei

lefr his job to set up N. E. Thing Enterprises. The company's posters and calendars were picked up in 1992 by a cult Japanese 1V show. From here a whole "art scene" evolved around

autostereograrns, and with the help of Tenyo, a Japanese company specialising in magic tricks, Biccei got autostereograms onto everything from aprons to pencil tins. He even found himself designing a poster for Disney. Not everyone can interpret autostereograms: about 10 per

cent of the population will not easily be able to see the 3D images they cany. This includes individuals with a squint or 9 October 1993

(,

..

N ~ w

,

SCIENTIST

2: Draw you own autostereogram TIllS program. which is written in the C

language, uses the algorithm for generating an autostereogram developed by Harold Thimbleby at Stirling University and Ian Witten and Stuart Inglis from the UniverSity of Waikato, New Zealand. The coordinates in the picture run from 0 to WIDTH-I horizontally and 0 to HEIGHT-1 vertically inclusive. calling draw3D (topHat). with topHat defined as in the program, will draw a Top Hat illusion. The Top Hat illusion is a shape that, although square, looks taller than it is wide. Checl< that your computer can draw squares properly. otherwise any effect might be due to distortion in the drawing rather than the illusion itself. The #d~fine WIDTH 500

illusion is interesting because it is not visible in the random dot pattern. so it must occur in the brain after the eyes' images have been fused. For an autostereogram to work, the dots in the picture, whether black or white, must be constrained to be the same as others along the same line, indeed, sometimes the same as many others both to their left and right. A linked list, same [i], for each dot i keeps track of just one other dot to the right of it that is the same. . . The routine works in three stages for each line y in the picture in tum. First, because every dot must be the same as itself, same [x]=x is set for each dot. Next, each point (x, y) on the object corresponds to two dots i and j that must be the same. The program only works this out

'*'* ¥

width of pieture--all distances in dots -/ height of picture -, #define EYES 180 ,. separation (assuming a 72 dot-per-inch screen) .,

#define HEIGHT 300

void draw3D(int (*z)(int. int»· ( int x. y, same[WIDTHJ, colour[WIDTH), sep, i, j, s; for (y = 0; y < HEIGHT; y++)(

#define GROUND (EYESI2) '* a dot separation for distant objects *' #define HAT (GROUN()...1) '* objects near background are easier to see

sameW = j; }"O~x

}

-

= WlDTH-l; x >= 0; xu) (

if( y >= HEIGHTI2-brimRadius) ( if( Y< HEIGHTI2+brimRadius-brimHeight) ( if( x >= WlDTHI2-headRadius && x< WlDTHI2+headRadius) return HAT;}

}}

else if( y < HEIGHTI2+brimRadius) if( x >=:: WlDTHI2-brimRadius &&

}

x,