Debian Codegraph @

userguide/pamcrater.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
2 <html><head><title>Pamcrater User Manual</title></head>
3 <body>
4 <h1>pamcrater</h1>
5 Updated: 03 November 2014
6 <br>
7 <a href="#index">Table Of Contents</a>
8
9 <h2>NAME</h2>
10
11 pamcrater - create cratered terrain by fractal forgery
12
13
14 <h2 id="synopsis">SYNOPSIS</h2>
15
16 <b>pamcrater</b>
17
18 [<b>-number</b> <i>n</i>]
19
20 [<b>-height</b> <i>pixels</i>]
21
22 [<b>-width</b> <i>pixels</i>]
23
24 [<b>-randomseed=</b><i>integer</i>]
25
26 [<b>-verbose</b>]
27
28 <h2 id="description">DESCRIPTION</h2>
29
30 <p>This program is part of <a href="index.html">Netpbm</a>.
31
32 <p><b>pamcrater</b> creates a PAM image which is a terrain map (not a visual
33 image) of cratered terrain. The terrain is as if a given number of impacts
34 into a surface create craters with random position and size.
35
36 <p>The size distribution of the craters is based on a power law which results
37 in many more small craters than large ones. The number of craters of a given
38 size varies as the reciprocal of the area as described on pages 31 and 32 of
39 Peitgen and Saupe[1]; cratered bodies in the Solar System are observed to obey
40 this relationship. The formula used to obtain crater radii governed by this
41 law from a uniformly distributed pseudorandom sequence was developed by Rudy
42 Rucker.
43
44 <p>A terrain map is a two dimensional map of terrain elevations. the PAM
45 image that <b>pamcrater</b> produces is therefore not a visual image but a
46 depth-one image of tuple type "elevation", with the sample value
47 being proportional to an elevation.
48
49 <p>You can visualize the terrain map by generating a shaded relief image of it
50 with <b>pamshadedrelief</b>. <p>High resolution images with large numbers of
51 craters often benefit from being piped through <b>pnmsmooth</b>. The
52 averaging performed by this process eliminates some of the jagged pixels and
53 lends a mellow ``telescopic image'' feel to the overall picture.
54
55 <p><b>pamcrater</b> generates only small craters, which are hemispherical in
56 shape (regardless of the incidence angle of the impacting body, as long as the
57 velocity is sufficiently high). Large craters, such as Copernicus and Tycho
58 on the Moon, have a ``walled plain'' shape with a cross-section more like:
59
60 <pre>
61 /\ /\
62 _____/ \____________/\____________/ \_____
63 </pre>
64
65
66 <p>Larger craters should really use this profile, including the central
67 peak, and totally obliterate the pre-existing terrain.
68
69 <p>The maxval of the PAM image is always 65535.
70
71 <p>The randomness in the image is limited before Netpbm 10.37 (December
72 2006) -- if you run the program twice in the same second, you may get
73 identical output.
74
75
76 <h2 id="options">OPTIONS</h2>
77
78 <p>In addition to the options common to all programs based on libnetpbm
79 (most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
80 Common Options</a>), <b>pamcrater</b> recognizes the following
81 command line options:
82
83 <p>All options can be abbreviated to their shortest unique prefix.
84
85 <dl compact>
86 <dt><b>-number</b> <i>n</i>
87
88 <dd>This causes <b>pamcrater</b> to generate <i>n</i> craters. If you do not
89 specify <b>-number</b>, it generates 50000 craters. Don't expect to see them
90 all! For every large crater there are many, many more tiny ones which tend
91 simply to erode the landscape. In general, the more craters you specify, the
92 more realistic the result; ideally you want the entire terrain to have been
93 extensively turned over again and again by cratering. High resolution images
94 containing five to ten million craters are stunning but take longer to create.
95
96 <dt><b>-height</b> <i>height</i>
97
98 <dd>This sets the height of the generated image to <i>height</i> pixels.
99 The default height is 256 pixels.
100
101 <dt><b>-width</b> <i>width</i>
102
103 <dd>This sets the width of the generated image to <i>width</i> pixels. The
104 default width is 256 pixels.
105
106 <dt><b>-randomseed=</b><i>integer</i>
107
108 <dd>This is the seed for the random number generator that generates the
109 pixels.
110
111 <p>Use this to ensure you get the same image on separate invocations.
112
113 <p>By default, <b>pamcrater</b> uses a seed derived from the time of day and
114 process ID, which gives you fairly uncorrelated results in multiple
115 invocations.
116
117 <p>This option was new in Netpbm 10.61 (December 2012).
118
119 <dt><b>-verbose</b>
120
121 <dd>This causes <b>pamcrater</b> to issue additional messages about what it
122 is doing.
123
124 <p>This option was new in Neptbm 10.69 (December 2014).
125
126 </dl>
127
128 <h2 id="examples">EXAMPLES</h2>
129
130 <pre>
131 <kbd>
132 $ pamcrater | pamshadedrelief | pamx
133
134 $ pamcrater -number=500000 -height=1000 -width=1000 &gt;craters.pam
135 </kbd>
136 </pre>
137
138 <h2 id="designnotes">DESIGN NOTES</h2>
139
140 <p>Real craters have two distinct morphologies.
141
142
143 <h2 id="seealso">SEE ALSO</h2>
144
145 <b><a href="pamshadedrelief.html">pamshadedrelief</a></b>,
146
147 <b><a href="ppmrelief.html">ppmrelief</a></b>,
148
149 <b><a href="pnmsmooth.html">pnmsmooth</a></b>
150
151 <b><a href="pam.html">pam</a></b>,
152
153 <dl compact>
154 <dt>[1]
155 <dd>Peitgen, H.-O., and Saupe, D. eds., The Science Of Fractal Images,
156 New York: Springer Verlag, 1988.
157
158 </dl>
159
160 <h2 id="author">AUTHOR</h2>
161
162 <p><b>pgmcrater</b>, from which this is derived, was written by John Walker:
163
164 <pre>
165 John Walker
166 Autodesk SA
167 Avenue des Champs-Montants 14b
168 CH-2074 MARIN
169 Suisse/Schweiz/Svizzera/Svizra/Switzerland
170 <b>Usenet:</b><a href="mailto:[email protected]">[email protected]</a>
171 <b>Fax:</b>038/33 88 15
172 <b>Voice:</b>038/33 76 33
173 </pre>
174
175 <p>Permission to use, copy, modify, and distribute this software and
176 its documentation for any purpose and without fee is hereby granted,
177 without any conditions or restrictions. This software is provided
178 "as is" without express or implied warranty.
179
180
181 <h2 id="history">HISTORY</h2>
182
183 <p>John Walker wrote <b>pgmcrater</b> in 1991 and it was included in Pbmplus.
184 <b>pgmcrater</b> did the equivalent of <kbd>pamcrater | pamshadedrelief</kbd>.
185 In Netpbm 10.68 (September 2014), Bryan Henderson split the functions
186 of <b>pgmcrater</b> into two programs, one (<b>pamcrater</b>) to compute
187 elevations, and the other (<b>pamshadedrelief</b>) to generate a shaded relief
188 visual image showing those elevations. Bryan did this because it is more in
189 keeping with Netpbm's modular architecture, and because
190 the <b>pamshadedrelief</b> might be useful with other inputs.
191
192 <p>(Like all Netpbm programs, <b>pgmcrater</b> was not static between the two
193 events described above; minor changes, including replacement of most of the
194 code, happened in between).
195
196 <p>The original 1991 <b>pgmcrater</b> manual contains the following:
197
198 <h3>PLUGWARE!</h3>
199
200 <p>If you like this kind of stuff, you may also enjoy "James Gleick's
201 Chaos--The Software" for MS-DOS, available for $59.95 from your
202 local software store or directly from Autodesk, Inc., Attn: Science
203 Series, 2320 Marinship Way, Sausalito, CA 94965, USA. Telephone:
204 (800) 688-2344 toll-free or, outside the U.S. (415) 332-2344 Ext
205 4886. Fax: (415) 289-4718. "Chaos--The Software" includes a more
206 comprehensive fractal forgery generator which creates
207 three-dimensional landscapes as well as clouds and planets, plus five
208 more modules which explore other aspects of Chaos. The user guide of
209 more than 200 pages includes an introduction by James Gleick and
210 detailed explanations by Rudy Rucker of the mathematics and algorithms
211 used by each program.
212
213 <hr>
214 <h2 id="index">Table Of Contents</h2>
215 <ul>
216 <li><a href="#synopsis">SYNOPSIS</a>
217 <li><a href="#description">DESCRIPTION</a>
218 <li><a href="#options">OPTIONS</a>
219 <li><a href="#examples">EXAMPLES</a>
220 <li><a href="#designnotes">DESIGN NOTES</a>
221 <li><a href="#seealso">SEE ALSO</a>
222 <li><a href="#author">AUTHOR</a>
223 <li><a href="#history">HISTORY</a>
224 </ul>
225 </body>
226 </html>