1Ppmforge User Manual(0) Ppmforge User Manual(0)
2
3
4
6 ppmforge - fractal forgeries of clouds, planets, and starry skies
7
9 ppmforge
10
11 [-clouds] [-night] [-dimension dimen] [-hour hour] [-inclination|-tilt
12 angle] [-mesh size] [-power factor] [-glaciers level] [-ice level]
13 [-saturation sat] [-seed seed] [-stars fraction] [{-xsize|-width}
14 width] [{-ysize|-height} height]
15
16
18 This program is part of Netpbm(1).
19
20 ppmforge generates three kinds of ``random fractal forgeries,'' the
21 term coined by Richard F. Voss of the IBM Thomas J. Watson Research
22 Center for seemingly realistic pictures of natural objects generated by
23 simple algorithms embodying randomness and fractal self-similarity.
24 The techniques used by ppmforge are essentially those given by Voss[1],
25 particularly the technique of spectral synthesis explained in more de‐
26 tail by Dietmar Saupe[2].
27
28 The program generates two varieties of pictures: planets and clouds,
29 which are just different renderings of data generated in an identical
30 manner, illustrating the unity of the fractal structure of these very
31 different objects. A third type of picture, a starry sky, is synthe‐
32 sised directly from pseudorandom numbers.
33
34 The generation of planets or clouds begins with the preparation of an
35 array of random data in the frequency domain. The size of this array,
36 the ``mesh size,'' can be set with the -mesh option; the larger the
37 mesh the more realistic the pictures but the calculation time and mem‐
38 ory requirement increases as the square of the mesh size. The fractal
39 dimension, which you can specify with the -dimension option, determines
40 the roughness of the terrain on the planet or the scale of detail in
41 the clouds. As the fractal dimension is increased, more high frequency
42 components are added into the random mesh.
43
44 Once the mesh is generated, an inverse two dimensional Fourier trans‐
45 form is performed upon it. This converts the original random frequency
46 domain data into spatial amplitudes. We scale the real components that
47 result from the Fourier transform into numbers from 0 to 1 associated
48 with each point on the mesh. You can further modify this number by ap‐
49 plying a ``power law scale'' to it with the -power option. Unity scale
50 leaves the numbers unmodified; a power scale of 0.5 takes the square
51 root of the numbers in the mesh, while a power scale of 3 replaces the
52 numbers in the mesh with their cubes. Power law scaling is best envi‐
53 sioned by thinking of the data as representing the elevation of ter‐
54 rain; powers less than 1 yield landscapes with vertical scarps that
55 look like glacially-carved valleys; powers greater than one make fairy-
56 castle spires (which require large mesh sizes and high resolution for
57 best results).
58
59 After these calculations, we have a array of the specified size con‐
60 taining numbers that range from 0 to 1. ppmforge generates as follows:
61
62 The randomness in the image is limited before Netpbm 10.37 (December
63 2006) -- if you run the program twice in the same second, you may get
64 identical output.
65
66
67
68 Clouds A color map is created that ranges from pure blue to white by
69 increasing admixture (desaturation) of blue with white. Numbers
70 less than 0.5 are colored blue, numbers between 0.5 and 1.0 are
71 colored with corresponding levels of white, with 1.0 being pure
72 white.
73
74
75 Planet The mesh is projected onto a sphere. Values less than 0.5 are
76 treated as water and values between 0.5 and 1.0 as land. The
77 water areas are colored based upon the water depth, and land
78 based on its elevation. The random depth data are used to cre‐
79 ate clouds over the oceans. An atmosphere approximately like
80 the Earth's is simulated; its light absorption is calculated to
81 create a blue cast around the limb of the planet. A function
82 that rises from 0 to 1 based on latitude is modulated by the lo‐
83 cal elevation to generate polar ice caps--high altitude terrain
84 carries glaciers farther from the pole. Based on the position
85 of the star with respect to the observer, the apparent color of
86 each pixel of the planet is calculated by ray-tracing from the
87 star to the planet to the observer and applying a lighting model
88 that sums ambient light and diffuse reflection (for most planets
89 ambient light is zero, as their primary star is the only source
90 of illumination). Additional random data are used to generate
91 stars around the planet.
92
93
94 Night A sequence of pseudorandom numbers is used to generate stars
95 with a user specified density.
96
97
98 Cloud pictures always contain 256 or fewer colors and may be displayed
99 on most color mapped devices without further processing. Planet pic‐
100 tures often contain tens of thousands of colors which must be com‐
101 pressed with pnmquant or ppmdither before encoding in a color mapped
102 format. If the display resolution is high enough, ppmdither generally
103 produces better looking planets. pnmquant tends to create discrete
104 color bands, particularly in the oceans, which are unrealistic and dis‐
105 tracting. The number of colors in starry sky pictures generated with
106 the -night option depends on the value specified for -saturation.
107 Small values limit the color temperature distribution of the stars and
108 reduce the number of colors in the image. If the -saturation is set to
109 0, none of the stars will be colored and the resulting image will never
110 contain more than 256 colors. Night sky pictures with many different
111 star colors often look best when color compressed by pamdepth rather
112 than pnmquant or ppmdither. Try newmaxval settings of 63, 31, or 15
113 with pamdepth to reduce the number of colors in the picture to 256 or
114 fewer.
115
116
117
119 In addition to the options common to all programs based on libnetpbm
120 (most notably -quiet, see
121 Common Options ⟨index.html#commonoptions⟩ ), ppmforge recognizes the
122 following command line options:
123
124 You can abbreviate any options to its shortest unique prefix.
125
126
127
128 -clouds
129 Generate clouds. An image of fractal clouds is generated. Se‐
130 lecting clouds sets the default for fractal dimension to 2.15
131 and power scale factor to 0.75.
132
133
134 -dimension dimen
135 Sets the fractal dimension to the specified dimen, which may be
136 any real number between 0 and 5 inclusive. Higher fractal di‐
137 mensions create more ``chaotic'' images, which require higher
138 resolution output and a larger FFT mesh size to look good. If
139 no dimension is specified, the program uses 2.4 when generating
140 planets and 2.15 for clouds.
141
142
143 -glaciers level
144 The floating point level setting controls the extent to which
145 terrain elevation causes ice to appear at lower latitudes. The
146 default value of 0.75 makes the polar caps extend toward the
147 equator across high terrain and forms glaciers in the highest
148 mountains, as on Earth. Higher values make ice sheets that
149 cover more and more of the land surface, simulating planets in
150 the midst of an ice age. Lower values tend to be boring, re‐
151 sulting in unrealistic geometrically-precise ice cap boundaries.
152
153
154 -hour hour
155 When generating a planet, ppmforge uses hour as the "hour angle
156 at the central meridian." If you specify -hour 12, for example,
157 the planet will be fully illuminated, corresponding to high noon
158 at the longitude at the center of the screen. You can specify
159 any floating point value between 0 and 24 for hour, but values
160 which place most of the planet in darkness (0 to 4 and 20 to 24)
161 result in crescents which, while pretty, don't give you many il‐
162 luminated pixels for the amount of computing that's required.
163 If no -hour option is specified, a random hour angle is chosen,
164 biased so that only 25% of the images generated will be cres‐
165 cents.
166
167
168 -ice level
169 Sets the extent of the polar ice caps to the given floating
170 point level. The default level of 0.4 produces ice caps similar
171 to those of the Earth. Smaller values reduce the amount of ice,
172 while larger -ice settings create more prominent ice caps. Suf‐
173 ficiently large values, such as 100 or more, in conjunction with
174 small settings for -glaciers (try 0.1) create "ice balls" like
175 Europa.
176
177
178 -inclination|-tilt angle
179 The inclination angle of the planet with regard to its primary
180 star is set to angle, which can be any floating point value from
181 -90 to 90. The inclination angle can be thought of as specify‐
182 ing, in degrees, the ``season'' the planet is currently experi‐
183 encing or, more precisely, the latitude at which the star tran‐
184 sits the zenith at local noon. If 0, the planet is at equinox;
185 the star is directly overhead at the equator. Positive values
186 represent summer in the northern hemisphere, negative values
187 summer in the southern hemisphere. The Earth's inclination an‐
188 gle, for example, is about 23.5 at the June solstice, 0 at the
189 equinoxes in March and September, and -23.5 at the December sol‐
190 stice. If no inclination angle is specified, a random value be‐
191 tween -21.6 and 21.6 degrees is chosen.
192
193
194 -mesh size
195 A mesh of size by size will be used for the fast Fourier trans‐
196 form (FFT). Note that memory requirements and computation speed
197 increase as the square of size; if you double the mesh size, the
198 program will use four times the memory and run four times as
199 long. The default mesh is 256x256, which produces reasonably
200 good looking pictures while using half a megabyte for the
201 256x256 array of single precision complex numbers required by
202 the FFT. On machines with limited memory capacity, you may have
203 to reduce the mesh size to avoid running out of RAM. Increasing
204 the mesh size produces better looking pictures; the difference
205 becomes particularly noticeable when generating high resolution
206 images with relatively high fractal dimensions (between 2.2 and
207 3).
208
209
210 -night A starry sky is generated. The stars are created by the same
211 algorithm used for the stars that surround planet pictures, but
212 the output consists exclusively of stars.
213
214
215 -power factor
216 Sets the "power factor" used to scale elevations synthesised
217 from the FFT to factor, which can be any floating point number
218 greater than zero. If no factor is specified a default of 1.2
219 is used if a planet is being generated, or 0.75 if clouds are
220 selected by the -clouds option. The result of the FFT image
221 synthesis is an array of elevation values between 0 and 1. A
222 non-unity power factor exponentiates each of these elevations to
223 the specified power. For example, a power factor of 2 squares
224 each value, while a power factor of 0.5 replaces each with its
225 square root. (Note that exponentiating values between 0 and 1
226 yields values that remain within that range.) Power factors
227 less than 1 emphasise large-scale elevation changes at the ex‐
228 pense of small variations. Power factors greater than 1 in‐
229 crease the roughness of the terrain and, like high fractal di‐
230 mensions, may require a larger FFT mesh size and/or higher
231 screen resolution to look good.
232
233
234 -saturation sat
235 Controls the degree of color saturation of the stars that sur‐
236 round planet pictures and fill starry skies created with the
237 -night option. The default value of 125 creates stars which re‐
238 semble the sky as seen by the human eye from Earth's surface.
239 Stars are dim; only the brightest activate the cones in the hu‐
240 man retina, causing color to be perceived. Higher values of sat
241 approximate the appearance of stars from Earth orbit, where bet‐
242 ter dark adaptation, absence of skyglow, and the concentration
243 of light from a given star onto a smaller area of the retina
244 thanks to the lack of atmospheric turbulence enhances the per‐
245 ception of color. Values greater than 250 create ``science fic‐
246 tion'' skies that, while pretty, don't occur in this universe.
247
248 Thanks to the inverse square law combined with Nature's love of
249 mediocrity, there are many, many dim stars for every bright one.
250 This population relationship is accurately reflected in the
251 skies created by ppmforge. Dim, low mass stars live much longer
252 than bright massive stars, consequently there are many reddish
253 stars for every blue giant. This relationship is preserved by
254 ppmforge. You can reverse the proportion, simulating the sky as
255 seen in a starburst galaxy, by specifying a negative sat value.
256
257
258 -seed num
259 Sets the seed for the random number generator to the integer
260 num. The seed used to create each picture is displayed on stan‐
261 dard output (unless suppressed with the -quiet option). Pic‐
262 tures generated with the same seed will be identical. If no
263 -seed is specified, a random seed derived from the date and time
264 will be chosen. Specifying an explicit seed allows you to re-
265 render a picture you particularly like at a higher resolution or
266 with different viewing parameters.
267
268
269 -stars fraction
270 Specifies the percentage of pixels, in tenths of a percent,
271 which will appear as stars, either surrounding a planet or fill‐
272 ing the entire frame if -night is specified. The default frac‐
273 tion is 100.
274
275
276 -xsize|-width width
277 Sets the width of the generated image to width pixels. The de‐
278 fault width is 256 pixels. Images must be at least as wide as
279 they are high; if a width less than the height is specified, it
280 will be increased to equal the height. If you must have a long
281 skinny image, make a square one with ppmforge, then use pamcut
282 to extract a portion of the shape and size you require.
283
284
285 -ysize|-height height
286 Sets the height of the generated image to height pixels. The
287 default height is 256 pixels. If the height specified exceeds
288 the width, the width will be increased to equal the height.
289
290
291
292
294 The algorithms require the output image to be at least as wide as it is
295 high, and the width to be an even number of pixels. These constraints
296 are enforced by increasing the size of the requested image if neces‐
297 sary.
298
299 You may have to reduce the FFT mesh size on machines with 16 bit inte‐
300 gers and segmented pointer architectures.
301
302
304 pamcut(1), pamdepth(1), ppmdither(1), pnmquant(1), ppm(1)
305
306
307
308 [1] Voss, Richard F., ``Random Fractal Forgeries,'' in Earnshaw et.
309 al., Fundamental Algorithms for Computer Graphics, Berlin:
310 Springer-Verlag, 1985.
311
312
313 [2] Peitgen, H.-O., and Saupe, D. eds., The Science Of Fractal Im‐
314 ages, New York: Springer Verlag, 1988.
315
316
317
318
320 John Walker
321 Autodesk SA
322 Avenue des Champs-Montants 14b
323 CH-2074 MARIN
324 Suisse/Schweiz/Svizzera/Svizra/Switzerland
325 Usenet:kelvin@Autodesk.com
326 Fax:038/33 88 15
327 Voice:038/33 76 33
328
329 Permission to use, copy, modify, and distribute this software and its
330 documentation for any purpose and without fee is hereby granted, with‐
331 out any conditions or restrictions. This software is provided ``as
332 is'' without express or implied warranty.
333
334
335 PLUGWARE!
336 If you like this kind of stuff, you may also enjoy ``James Gleick's
337 Chaos--The Software'' for MS-DOS, available for $59.95 from your local
338 software store or directly from Autodesk, Inc., Attn: Science Series,
339 2320 Marinship Way, Sausalito, CA 94965, USA. Telephone: (800)
340 688-2344 toll-free or, outside the U.S. (415) 332-2344 Ext 4886. Fax:
341 (415) 289-4718. ``Chaos--The Software'' includes a more comprehensive
342 fractal forgery generator which creates three-dimensional landscapes as
343 well as clouds and planets, plus five more modules which explore other
344 aspects of Chaos. The user guide of more than 200 pages includes an
345 introduction by James Gleick and detailed explanations by Rudy Rucker
346 of the mathematics and algorithms used by each program.
347
349 This manual page was generated by the Netpbm tool 'makeman' from HTML
350 source. The master documentation is at
351
352 http://netpbm.sourceforge.net/doc/ppmforge.html
353
354netpbm documentation 27 March 2021 Ppmforge User Manual(0)