307

Neuroscience Research, 12 (1991) 307-311© 1991 Elsevier Scientific Publishers Ireland, Ltd. 0168-0102/91/$03.50
N E U R E S 00476

Technical Note

Generation of fractal patterns for probing
the visual memory
Yasushi Miyashita, Sei-Ichi Higuchi, Kuniyoshi Sakai and Naohiko Masui
Department of Physiology, University of Tokyo, School of Medicine, Hongo, Tokyo (Japan)(Received 20 May 1991; Accepted 13 June 1991)

Key words: Fractal algorithm; Declarative memory; Pictorial stimulus; Trial-unique; Computer implementation

SUMMARY
The effective use of computer-generated pictures as a trial-unique probe for studying the visual memory isdescribed. The shape of the pattern is determined by m e a n s of a fractal algorithm with p s e u d o r a n d o mparameters. This method enables us to easily obtain thousands of moderately complex and sufficiently
diversified pictures in series from a given n u m b e r which serves as the seed of a p s e u d o r a n d o m n u m b e r
generator. We can thereby create a new and unique set of pictures if a new seed is given, as well as retrieve
exactly the same pictures in the same sequence as when the original seed is given. These properties eliminate
the d e m a n d for the massive memory space in a computer otherwise needed to store the entire set of stimulus
pictures.

In testing the non-verbal form of memory or perception, various kinds of complex
scenes have been utilized as a probe for event-related potentials 10, positron emission
tomography 3 or single-unit recordings 4. The scenes included geometric figures 2,3,10,
complex 'junk' objects 7, faces 2,4 or TV frame images 1. However, since the declarative
memory which depends on the integrity of the medial temporal lobe 6 is best tested
through a task requiring the memory of trial-unique objects 7,11 we need a considerable
number of novel visual stimuli presented to a subject in the study of the non-verbal
declarative memory.
To meet this requirement, we have developed a new method based on the fractal
algorithm 5, with which (a) thousands of different color pictures were generated by acomputer; (b) the complexity of the pattern was readily chosen through the adjustmentof some fractal parameters; (c) each set of consecutively generated pictures originatedfrom a unique number (a seed) that could reproduce exactly the same set of pictures as
when given to the computer; and (d) the memory space needed in the computer forstorage of the pictures was thereby reduced without losing the patterns' reproducibility.
We applied this method to a delayed matching-to-sample (DMS) task; some of theresults of single-unit recordings during the task have been reported previously 8,9
A computer (VAX-11, DEC) interfaced with image-processing hardware (IP8500,Gould Inc., Image and Graphics Division) was used to generate stimulus pictures and tocontrol the DMS task. The stimuli were displayed on a video monitor (KX-14HD1,Correspondence." Dr. Yasushi Miyashita, D e p a r t m e n t of Physiology, University of Tokyo, School of Medicine,
7-3-1 Hongo, Bunkyo-ku, Tokyo 113, Japan.

308

I GETA SEEO THE.AN . R GEHERATORIII GET THE NUMBER OFSUPERPOSITIONrRANOOM NUMBERGET THE NUMBER OF EDGES

1RANDOM NUMBERGET THE EDGE SIZEIRANDOM NUMBER

1GET THE DEPTH OF RECURSlON 1IIRANDOM NUMBER
OEFLECT THE MIDPOINTOF EACH EDGEI RANDOM NUMBERGET THE COLOR

Fig. 1.

SONY) with a resolution of 512 × 512 pixels in 256 colors. The program was written in
F O R T R A N 7 7 and C, and linked with the image library routines supplied by Gould
IGD. Some characteristic parameters in the fractal algorithm (see below) were determined by sequential calls to a pseudorandom number-generating function ( ' R A N D ' ) in
D E C F O R T R A N 7 7 or C.
The algorithm for picture generation is shown in Figure 1. First, a polygon isconstructed which is then recursively deflected at the edges to make a contour of a unit
fractal pattern. The algorithm proceeds as follows. Coordinates of corner points of thepolygon are represented as a list. The recursive deflection subroutine returns an output
list twice as long as the input list by inserting intermediate points lying on theperpendicular bisector of the line between two adjacent input points. The essential partof this calculation is shown in the Appendix. This deflection procedure is repeated asmany times as predetermined by the p a r a m e t e r of recursion depth; more repetitions of

309"Fig. 2.

this procedure produce more elaborate, complicated contours. The unit contour is filledin with color, and several colored unit patterns are then superposed one onto another toform a stimulus picture. The phase angle for the superposition is usually fixed at zero,but can be randomized if necessary. The characteristic parameters determined by
R A N D include the initial number of edges of the polygon, the initial size of the edges,
the depth of recursion, the amplitude of deflection of the edges, and the color of each
unit fractal figure, as indicated by ' R A N D O M N U M B E R ' in Figure 1. The seed for
R A N D was given by the experimenter for the first picture, while the following pictures
were generated automatically in succession.
Pictures generated by the algorithm shown in Figure 1 are exemplified in Figure 2.
Each picture was made up of 3 superposed colored fractal figures. The initial number ofthe edges ranged from 2 to 6. The depth of recursion was limited to 2-5. Expansion ofthese parameter limitations resulted in more complicated pictures.
The pictures generated by the present method are sufficiently diversified and still
highly distinguishable to the subjects. In fact, the pictures were successfully used as
sample and match stimuli in the DMS task in a single-unit study of the visual memory ofmonkeys. Sample and match stimuli were displayed on the video monitor for 0.2 s with a310
delay interval of 16 s. The monkey was to memorize the sample stimulus during thedelay period and to decide whether the match stimulus was the same or different. Themonkeys performed the DMS task at more than a 90% correct level even when a new,unfamiliar set of pictures was used as the sample stimulus 9. Furthermore, the neurons
in the anterior ventral temporal cortex responded very selectively to only a few(sometimes just one) of the set of 100 pictures, and the optimal stimuli varied from cellto cell s. These experimental results confirm the distinguishability of the pictures.
Obviously, the present algorithm can produce much more complex fractal patterns thanthose shown in Figure 2, and the degree with which the patterns can be distinguished ina given task limits the practical range of the patterns' complexity.
The trial-unique stimuli used in a memory task are usually supplied by real 'junk'
objects with various shapes and colors 7. However, the practical number of such 'junk'objects in a laboratory is less than a thousand, and thus the same object must be used
repeatedly in a pseudo-trial-unique manner. The present procedure overcomes such
limitations. It guarantees that different seeds generate different pictures, and that thesame seeds generate exactly the same pictures, thus eliminating the demand for themassive memory space in the computer otherwise needed to store the whole set ofstimulus pictures. Since the algorithm developed here can be implemented on any
computer with an image frame buffer, this method will facilitate the probing of thevisual memory with exact stimulus control.
ACKNOWLEDGEMENTS
The authors wish to thank Gould Inc. for permitting us use of the image-processing
library routines as part of our program. This work was supported by a grant from theJapanese Ministry of Education, Science and Culture (No. 02102008).
APPENDIX
The box ' D E F L E C T T H E M I D P O I N T OF E A C H E D G E ' in Figure 1 is calculated
as follows. The Cartesian coordinates of the ith corner point of the polygon are stored
in an array, say fract-x(i) and fract-y(i), i = 1 to n, where n is the number of edges. The
recursive deflection subroutine works on this array and returns an output array of length2n.
In the subroutine, the ith point is moved to the 2 i t h point (i = 1 to n). Then, thecoordinate of the intermediate point, fract-x(i + 1) and fract-y(i + 1), lying on theperpendicular bisector of the line between two adjacent points, i and i + 2, can becalculated as:
m x = (fract-x(i) + fract-x(i + 2 ) ) / 2
m y = (fract-y(i) + fract-y(i + 2 ) ) / 2
dx = fract-x(i + 2) - fract-x(i)d y = fract-y(i + 2) - fract-y(i)theta = a r c t a n ( d y / d x )fract-x(i + 1) = m x + G A * sin(theta)
fract-y(i + 1) = m y - G A * cos(theta)
where G A is a p a r a m e t e r determined by R A N D , and specifies the amplitude ofdeflection for the i + 1-th point on the perpendicular bisector. Note that G A can have anegative value.

311
REFERENCES
1 Baylis, G.C. and Rolls, E.T., Responses of neurons in the inferior temporal cortex in short term and serial
recognition memory tasks, Exp. Brain Res., 65 (1987) 614-622.
2 Desimone, R., Albreight, T.D., Gross, C.G. and Bruce, C., Stimulus-selective properties of inferior
temporal neurons in the Macaque, J. Neurosci., 4 (1984) 2051-2062.
3 Fox, P.T., Mintun, M.A., Raichle, M.E., Miezin, F.M., Allman, J.M. and Van Essen, D.C., Mapping humanvisual cortex with positron emission tomography, Nature, 323 (1986) 806-809.
4 Heit, G., Smith, M.E. and Halgren, E., Neural encoding of individual words and faces by the humanhippocampus and amygdala, Nature, 333 (1988) 773-775.
5 Mandelbrot, M., The Fractal Geometry of Nature, Freeman and Company, New York, 1982.
6 Milner, B., Corkin, S. and Teuber, H.L., Further analysis of the hippocampal amnesic syndrome: 14-year
follow up study of H.M., Neuropsychologia, 6 (1968) 215-234.
7 Mishkin, M., Spiegler, B.J., Saunders, R.C. and Malamut, B.L., An animal model of global amnesia. In S.
Corkin et al. (Eds.), Alzheimer's Disease: A Report of Progress, Raven Press, New York, 1982, pp. 235-247.
8 Miyashita, Y. and Chang, H.S., Neuronal correlate of pictorial short-term memory in the primate temporalcortex, Nature, 331 (1988) 68-70.
9 Miyashita, Y., Neuronal correlate of visual associative long-term memory in the primate temporal cortex,
Nature, 335, (1988) 817-820.
10 Ritter, W., Vaughan Jr., H.G. and Simon, R., On relating event-related potential components to stages ofinformation processing, In A.W.K. Gaillard and W. Ritter (Eds.), Adt,ances in Psychology, Vol. 10, 1983,
North-Holland Publishing Company, Amsterdam. pp. 143-158.
11 Squire, L.R., Mechanisms of memory, Science, 232 (1986) 1612-1619.