Vous êtes sur la page 1sur 2

Graphics Gallery

Random Series in Computer Graphics


There may be many ways in which randomness contributes to the beauty of a picture. We show
how correlation properties of a random series affect the visual attractiveness of patterns generated
by the series and give some examples of our recent designs made with Mathematica.

Igor S. Bakshee and Toshimitsu Musha

Using random patterns and placing elements randomly in a Power Spectral Density

picture is an old idea. Computers make it fairly easy to do. 100000.


However, this kind of design necessarily appears to have been
created artificially and hardly resembles human art. Some-
thing is missing in such pictures. They are soulless. At present, 1000. Random Walk
we do not know in general what to add to make a computer-
simulated random pattern mimic one created either by 1f
humans or by nature. However, we think we are able to make 10.

a suggestion. Briefly, the technique is to add memory to Lorentz

the random sequence.


0.1
One way to describe mathematically the memory hidden in
a sequence of random numbers is by the spectral density or White
correlation between distant points. In this article, we first
0.001
introduce a few types of random sequences we will employ
and then design a few simple patterns using these sequences in
order to explain our approach. We will see how spectral shape
0.00001
of a random sequence affects the degree to which the pattern 0.001 0.1 10. 1000.
appears interesting and natural. These qualities are diffi- Frequency
cult to measure, or even explain, but we will try anyway.
We also present some examples of actual random designs FIGURE 1. Power spectra for white, flicker, random-walk, and Lorentz sequences.
made with Mathematica. Some of the examples are taken
from our collection of textile patterns which has recently been ponents contribute equally to the total power). Sometimes
adopted for this years Spring and Summer womens fashion this analogy is extended and flicker noise is referred to as
here in Japan. pink. In general, any noise with memory is called col-
ored noise.
Memory in Random Sequences An n-point sequence with a white spectrum can be simu-
lated by a sequence of random numbers:
Three basic types of random processes that are often present
in physical systems are known as white (1f 0), flicker (1f), white[n_] := Table[Random[] .5, {n}]
and random walk (1f2) noises. They are distinguished by
the forms of the dependence of the power spectral density Individual points in the sequence are not correlated and,
S(f) on the frequency f (see Figure 1). In a white sequence, therefore, the spectrum is flat. An n-point 1f 2 sequence can
points are absolutely uncorrelated, while in both 1f and 1f 2 be generated by a random walk:
sequences, points are correlated over any time scale. Due to

RandomWalk[n_] :=
0
the divergence of the integral S(f) df at the low or high (or
both) frequency limits, none of these types could exist in FoldList[Plus, 0, Table[Random[], {n}] - .5] // Rest
nature in its pure form. However, they do describe real pro-
cesses in a limited frequency range. White noise got its name This form of accumulation of random increments is essen-
from the analogy with white light (in which all spectral com- tially an integration of the original (white) sequence, which
results in a 1f 2 type of spectrum.
Igor S. Bakshee is a visiting scientist in the department of electrical engineering at Things are more complicated with 1f-type sequences. At
the Science University of Tokyo, on leave from the Institute of Semiconductors, present, there is no universal explanation of this type of noise,
Ukrainian Academy of Sciences, Kiev. He received his degree in Physical and though it is certainly a universal phenomenon. It can be found
Mathematical Science from Moscow State University in 1984.
almost in any physical system, as well as in biological, meteo-
Toshimitsu Musha is a professor of electrical engineering at the Science University rological, and other systems. Both classical and rock music
of Tokyo, a professor emeritus at the Tokyo Institute of Technology, and the pres-
ident and founder of the Brain Functions Laboratory, Inc. feature the same 1f law [Voss and Clarke 1975]. Though

VOLUME 4, ISSUE 1 9
the origin of the 1f spectrum is unknown, sequences pos- could be random sequences possessing the Lorentz type of
sessing this kind of spectrum can easily be simulated with a spectrum,
computer. The recipe is to transform a white noise into the S(f) t ,
frequency domain with the Fourier function, multiply the 1 + (2pft)2
result point-wise with a Fourier-transformed 1 t kernel, and
then take the product back to the time domain with Inverse- which is white at low frequencies (f << 12pt) and has
Fourier (for a good overview of the subject, see the paper by asymptotic 1f 2 behavior at high frequencies (Figure 1).
William H. Press [1978]). There are a number of ways to generate a Lorentzian
sequence. Here, we use a somewhat modified random walk in
Random Hedgehogs: From Spectrum to Picture which random increments are added with a weight:

Let us see how memory reveals itself in a picture. In Figure 2, Lorentz[n_, c_] :=
we show random hedgehogs, which are polar plots of ran- NestList[# c + Random[](1-c)&, 0, n] - .5 // Rest
dom sequences with a given spectrum. They are displayed
with the function PolarListPlot, from the standard package
To get steady state in such a system one should drop the
Graphics`Graphics`. The length of all the sequences is chosen to
first few elements of the list (more for higher values of the
be 100.
weight c). Figure 2d shows some Lorentz hedgehogs and
confirms that the flicker and Lorentz hedgehogs look quite
similar.

Colored Noise in Color Arrangements


a We illustrate our approach with one more example. Starting
with a regular square lattice of dots, we increment their posi-
tions by elements of a random matrix whose rows and
columns have the given spectrum. The colors of the dots are
decided by a random matrix of the same form. The matrices
b can be generated by the function:

array[fun_, {n_, m_}] :=


Table[fun[m], {n}] + Transpose[ Table[fun[n], {m}] ]

where fun is a pure function (such as White or RandomWalk) that


c creates a list with the desired spectrum. As can be seen from
the flicker and random-walk dots in Figure 3 (next page),
correlation in positions and colors seems to make the pattern
more natural (or, at least, less artificial).

Applied and Pure Art


d
The following pages show some pieces of our random
FIGURE 2. White (a), flicker (b), random-walk (c), and Lorentz (d) hedgehogs. designs. It must be emphasized that the most interesting
results have been obtained with the 1f -type of random
We can see that complete randomness (white noise) pro- sequences. The idea of using this type of sequence in fashion
duces patterns that are hard to distinguish from each other. design is due to T. Musha, and the designs are now sold under
Adding correlation (either of 1f or 1f 2 type) makes each the trademark T. Musha Print, a trademark of Yuragi
hedgehog look individual. The difference between the 1f and Kenkyusho. The graphic design and Mathematica program-
1f 2 patterns is not prominent, but it certainly exists: the lat- ming are by I. S. Bakshee.
ter are more monotonous and the former are in between the
latter and the white noise patterns. We could say that the References
flicker hedgehogs combine randomness and predictability in
the right proportions. This intermediate character of 1f Voss, R. F., and J. Clarke. 1975. Nature 258:317.
noise makes the resulting pattern more stable (perhaps at the Press, W. H. 1978. Comments Astrophys. 7:103119.
expense of originality).
The 1f type of spectrum is certainly not the only way to
balance the originality of 1f 2 noise with the predictability Igor S. Bakshee
of white noise. Another possibility comes from an under- Toshimitsu Musha
standing that predictability means the convergence of the Department of Electrical Engineering,

Science University of Tokyo,
0
integral S(f) df at low frequencies and that originality
comes from a strong correlation between points (1f 2 behav- 1-3 Kagurazaka, Shinjuku-ku, Tokyo 162, Japan
ior) at the high frequency part of the spectrum. We therefore ib@drifkoji.yy.kagu.sut.ac.jp
suggest that another suitable candidate for graphics design musha@drifkoji.yy.kagu.sut.ac.jp

10 THE MATHEMATICA JOURNAL 1994 Miller Freeman Publications

Vous aimerez peut-être aussi