[-clouds] [-night] [-dimension dimen] [-hour hour] [-inclination|-tilt
angle] [-mesh size] [-power factor] [-glaciers level] [-ice level]
[-saturation sat] [-seed seed] [-stars fraction] [{-xsize|-width}
width] [{-ysize|-height} height]

This program is part of Netpbm.

ppmforge generates three kinds of ''random fractal forgeries,'' the
term coined by Richard F. Voss of the IBM Thomas J. Watson Research
Center for seemingly realistic pictures of natural objects generated
by simple algorithms embodying randomness and fractal self-similarity.
The techniques used by ppmforge are essentially those given by
Voss[1], particularly the technique of spectral synthesis explained in
more detail by Dietmar Saupe[2].

The program generates two varieties of pictures: planets and clouds,
which are just different renderings of data generated in an identical
manner, illustrating the unity of the fractal structure of these very
different objects. A third type of picture, a starry sky, is synthe-
sised directly from pseudorandom numbers.

The generation of planets or clouds begins with the preparation of an
array of random data in the frequency domain. The size of this array,
the ''mesh size,'' can be set with the -mesh option; the larger the
mesh the more realistic the pictures but the calculation time and mem-
ory requirement increases as the square of the mesh size. The fractal
dimension, which you can specify with the -dimension option, deter-
mines the roughness of the terrain on the planet or the scale of
detail in the clouds. As the fractal dimension is increased, more
high frequency components are added into the random mesh.

Once the mesh is generated, an inverse two dimensional Fourier trans-
form is performed upon it. This converts the original random fre-
quency domain data into spatial amplitudes. We scale the real compo-
nents that result from the Fourier transform into numbers from 0 to 1
associated with each point on the mesh. You can further modify this
number by applying a ''power law scale'' to it with the -power option.
Unity scale leaves the numbers unmodified; a power scale of 0.5 takes
the square root of the numbers in the mesh, while a power scale of 3
replaces the numbers in the mesh with their cubes. Power law scaling
is best envisioned by thinking of the data as representing the eleva-
tion of terrain; powers less than 1 yield landscapes with vertical
scarps that look like glacially-carved valleys; powers greater than
one make fairy-castle spires (which require large mesh sizes and high
resolution for best results).

After these calculations, we have a array of the specified size con-
taining numbers that range from 0 to 1. ppmforge generates as fol-

The randomness in the image is limited before Netpbm 10.37 (December
2006) -- if you run the program twice in the same second, you may get
identical output.

Clouds A color map is created that ranges from pure blue to white by

Planet The mesh is projected onto a sphere. Values less than 0.5 are

Night A sequence of pseudorandom numbers is used to generate stars

Cloud pictures always contain 256 or fewer colors and may be displayed
on most color mapped devices without further processing. Planet pic-
tures often contain tens of thousands of colors which must be com-
pressed with pnmquant or ppmdither before encoding in a color mapped
format. If the display resolution is high enough, ppmdither generally
produces better looking planets. pnmquant tends to create discrete
color bands, particularly in the oceans, which are unrealistic and
distracting. The number of colors in starry sky pictures generated
with the -night option depends on the value specified for -saturation.
Small values limit the color temperature distribution of the stars and
reduce the number of colors in the image. If the -saturation is set
to 0, none of the stars will be colored and the resulting image will
never contain more than 256 colors. Night sky pictures with many dif-
ferent star colors often look best when color compressed by pamdepth
rather than pnmquant or ppmdither. Try newmaxval settings of 63, 31,
or 15 with pamdepth to reduce the number of colors in the picture to
256 or fewer.

You can abbreviate any options to its shortest unique prefix.


-dimension dimen

-glaciers level

-hour hour

-ice level

-inclination|-tilt angle

-mesh size

-night A starry sky is generated. The stars are created by the same

-power factor

-saturation sat

-seed num

-stars fraction

-xsize|-width width

-ysize|-height height

The algorithms require the output image to be at least as wide as it
is high, and the width to be an even number of pixels. These con-
straints are enforced by increasing the size of the requested image if

You may have to reduce the FFT mesh size on machines with 16 bit inte-
gers and segmented pointer architectures.

pamcut, pamdepth, ppmdither, pnmquant, ppm

[1] Voss, Richard F., ''Random Fractal Forgeries,'' in Earnshaw et.

[2] Peitgen, H.-O., and Saupe, D. eds., The Science Of Fractal

John Walker
Autodesk SA
Avenue des Champs-Montants 14b
Fax:038/33 88 15
Voice:038/33 76 33

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted, with-
out any conditions or restrictions. This software is provided ''as
is'' without express or implied warranty.

If you like this kind of stuff, you may also enjoy ''James Gleick's
Chaos--The Software'' for MS-DOS, available for $59.95 from your local
software store or directly from Autodesk, Inc., Attn: Science Series,
2320 Marinship Way, Sausalito, CA 94965, USA. Telephone: (800)
688-2344 toll-free or, outside the U.S. (415) 332-2344 Ext 4886. Fax:
(415) 289-4718. ''Chaos--The Software'' includes a more comprehensive
fractal forgery generator which creates three-dimensional landscapes
as well as clouds and planets, plus five more modules which explore
other aspects of Chaos. The user guide of more than 200 pages
includes an introduction by James Gleick and detailed explanations by
Rudy Rucker of the mathematics and algorithms used by each program.

netpbm documentation 25 October 1991 Ppmforge User Manual(0)