1Pgmcrater User Manual(0) Pgmcrater User Manual(0)
2
3
4
6 pgmcrater - create cratered terrain by fractal forgery
7
8
10 pgmcrater
11
12 [-number n]
13
14 [-height|-ysize s]
15
16 [-width|-xsize s]
17
18 [-gamma g]
19
20
21
23 This program is part of Netpbm(1).
24
25 pgmcrater creates a PGM image which mimics cratered terrain. The PGM
26 image is created by simulating the impact of a given number of craters
27 with random position and size, then rendering the resulting terrain
28 elevations based on a light source shining from one side of the screen.
29 The size distribution of the craters is based on a power law which
30 results in many more small craters than large ones. The number of
31 craters of a given size varies as the reciprocal of the area as
32 described on pages 31 and 32 of Peitgen and Saupe[1]; cratered bodies
33 in the Solar System are observed to obey this relationship. The for‐
34 mula used to obtain crater radii governed by this law from a uniformly
35 distributed pseudorandom sequence was developed by Rudy Rucker.
36
37 High resolution images with large numbers of craters often benefit from
38 being piped through pnmsmooth. The averaging performed by this process
39 eliminates some of the jagged pixels and lends a mellow ``telescopic
40 image'' feel to the overall picture.
41
42 pgmcrater simulates only small craters, which are hemispherical in
43 shape (regardless of the incidence angle of the impacting body, as long
44 as the velocity is sufficiently high). Large craters, such as Coperni‐
45 cus and Tycho on the Moon, have a ``walled plain'' shape with a cross-
46 section more like:
47
48 / / _____/ ____________/____________/ _____
49
50
51 Larger craters should really use this profile, including the central
52 peak, and totally obliterate the pre-existing terrain.
53
54
56 All options can be abbreviated to their shortest unique prefix.
57
58
59
60 -number n
61 Causes n craters to be generated. If no -number specification
62 is given, 50000 craters will be generated. Don't expect to see
63 them all! For every large crater there are many, many more tiny
64 ones which tend simply to erode the landscape. In general, the
65 more craters you specify the more realistic the result; ideally
66 you want the entire terrain to have been extensively turned over
67 again and again by cratering. High resolution images containing
68 five to ten million craters are stunning but take quite a while
69 to create.
70
71
72 -height height
73 Sets the height of the generated image to height pixels. The
74 default height is 256 pixels.
75
76
77 -width width
78 Sets the width of the generated image to width pixels. The
79 default width is 256 pixels.
80
81
82 -xsize width
83 Sets the width of the generated image to width pixels. The
84 default width is 256 pixels.
85
86
87 -ysize height
88 Sets the height of the generated image to height pixels. The
89 default height is 256 pixels.
90
91
92 -gamma factor
93 The specified factor is used to gamma adjust the image in the
94 same manner as performed by pnmgamma. The default value is 1.0,
95 which results in a medium contrast image. Values larger than 1
96 lighten the image and reduce contrast, while values less than 1
97 darken the image, increasing contrast.
98
99 Note that this is separate from the gamma correction that is
100 part of the definition of the PGM format. The image pnmgamma
101 generates is a genuine, gamma-corrected PGM image in any case.
102 This option simply changes the contrast and may compensate for a
103 display device that does not correctly render PGM images.
104
105
106
107
109 The-gamma option isn't really necessary since you can achieve the same
110 effect by piping the output from pgmcrater through pnmgamma. However,
111 pgmcrater performs an internal gamma map anyway in the process of ren‐
112 dering the elevation array into the PGM format, so there's no addi‐
113 tional overhead in allowing an additional gamma adjustment.
114
115 Real craters have two distinct morphologies.
116
117
119 pnmgamma(1), pnmsmooth(1) pgm(1),
120
121
122
123 [1] Peitgen, H.-O., and Saupe, D. eds., The Science Of Fractal
124 Images, New York: Springer Verlag, 1988.
125
126
127
128
130 John Walker
131 Autodesk SA
132 Avenue des Champs-Montants 14b
133 CH-2074 MARIN
134 Suisse/Schweiz/Svizzera/Svizra/Switzerland
135 Usenet:kelvin@Autodesk.com
136 Fax:038/33 88 15
137 Voice:038/33 76 33
138
139 Permission to use, copy, modify, and distribute this software and its
140 documentation for any purpose and without fee is hereby granted, with‐
141 out any conditions or restrictions. This software is provided 'as is'
142 without express or implied warranty.
143
144
146 The original 1991 version of this manual contains the following:
147
148
149 PLUGWARE!
150 If you like this kind of stuff, you may also enjoy 'James Gleick's
151 Chaos--The Software' for MS-DOS, available for $59.95 from your local
152 software store or directly from Autodesk, Inc., Attn: Science Series,
153 2320 Marinship Way, Sausalito, CA 94965, USA. Telephone: (800)
154 688-2344 toll-free or, outside the U.S. (415) 332-2344 Ext 4886. Fax:
155 (415) 289-4718. 'Chaos--The Software' includes a more comprehensive
156 fractal forgery generator which creates three-dimensional landscapes as
157 well as clouds and planets, plus five more modules which explore other
158 aspects of Chaos. The user guide of more than 200 pages includes an
159 introduction by James Gleick and detailed explanations by Rudy Rucker
160 of the mathematics and algorithms used by each program.
161
162
163
164netpbm documentation 15 October 1991 Pgmcrater User Manual(0)