1Pgmcrater User Manual(0)                              Pgmcrater User Manual(0)
2
3
4

NAME

6       pgmcrater - create cratered terrain by fractal forgery
7
8

SYNOPSIS

10       pgmcrater
11
12       [-number n]
13
14       [-height|-ysize s]
15
16       [-width|-xsize s]
17
18       [-gamma g]
19
20
21

DESCRIPTION

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
52       Larger craters should really use this profile,  including  the  central
53       peak, and totally obliterate the pre-existing terrain.
54
55       The  randomness  in  the image is limited before Netpbm 10.37 (December
56       2006) -- if you run the program twice in the same second, you  may  get
57       identical output.
58
59

OPTIONS

61       All options can be abbreviated to their shortest unique prefix.
62
63
64
65       -number n
66              Causes  n  craters to be generated.  If no -number specification
67              is given, 50000 craters will be generated.  Don't expect to  see
68              them all!  For every large crater there are many, many more tiny
69              ones which tend simply to erode the landscape.  In general,  the
70              more  craters you specify the more realistic the result; ideally
71              you want the entire terrain to have been extensively turned over
72              again and again by cratering.  High resolution images containing
73              five to ten million craters are stunning but take quite a  while
74              to create.
75
76
77       -height height
78              Sets  the  height  of the generated image to height pixels.  The
79              default height is 256 pixels.
80
81
82       -width width
83              Sets the width of the generated  image  to  width  pixels.   The
84              default width is 256 pixels.
85
86
87       -xsize width
88              Sets  the  width  of  the  generated image to width pixels.  The
89              default width is 256 pixels.
90
91
92       -ysize height
93              Sets the height of the generated image to  height  pixels.   The
94              default height is 256 pixels.
95
96
97       -gamma factor
98              The  specified  factor  is used to gamma adjust the image in the
99              same manner as performed by pnmgamma.  The default value is 1.0,
100              which  results in a medium contrast image.  Values larger than 1
101              lighten the image and reduce contrast, while values less than  1
102              darken the image, increasing contrast.
103
104              Note  that  this  is  separate from the gamma correction that is
105              part of the definition of the PGM format.   The  image  pnmgamma
106              generates  is  a genuine, gamma-corrected PGM image in any case.
107              This option simply changes the contrast and may compensate for a
108              display device that does not correctly render PGM images.
109
110
111
112

DESIGN NOTES

114       The-gamma  option isn't really necessary since you can achieve the same
115       effect by piping the output from pgmcrater through pnmgamma.   However,
116       pgmcrater  performs an internal gamma map anyway in the process of ren‐
117       dering the elevation array into the PGM format,  so  there's  no  addi‐
118       tional overhead in allowing an additional gamma adjustment.
119
120       Real craters have two distinct morphologies.
121
122

SEE ALSO

124       pnmgamma(1), pnmsmooth(1) pgm(1),
125
126
127
128       [1]    Peitgen,  H.-O.,  and  Saupe,  D.  eds.,  The Science Of Fractal
129              Images, New York: Springer Verlag, 1988.
130
131
132
133

AUTHOR

135       John Walker
136       Autodesk SA
137       Avenue des Champs-Montants 14b
138       CH-2074 MARIN
139       Suisse/Schweiz/Svizzera/Svizra/Switzerland
140           Usenet:kelvin@Autodesk.com
141           Fax:038/33 88 15
142           Voice:038/33 76 33
143
144       Permission to use, copy, modify, and distribute this software  and  its
145       documentation  for any purpose and without fee is hereby granted, with‐
146       out any conditions or restrictions.  This software is provided 'as  is'
147       without express or implied warranty.
148
149

HISTORY

151       The original 1991 version of this manual contains the following:
152
153
154   PLUGWARE!
155       If  you  like  this  kind  of stuff, you may also enjoy 'James Gleick's
156       Chaos--The Software' for MS-DOS, available for $59.95 from  your  local
157       software  store  or directly from Autodesk, Inc., Attn: Science Series,
158       2320  Marinship  Way,  Sausalito,  CA  94965,  USA.   Telephone:  (800)
159       688-2344  toll-free or, outside the U.S. (415) 332-2344 Ext 4886.  Fax:
160       (415) 289-4718.  'Chaos--The Software' includes  a  more  comprehensive
161       fractal forgery generator which creates three-dimensional landscapes as
162       well as clouds and planets, plus five more modules which explore  other
163       aspects  of  Chaos.   The user guide of more than 200 pages includes an
164       introduction by James Gleick and detailed explanations by  Rudy  Rucker
165       of the mathematics and algorithms used by each program.
166
167
168
169netpbm documentation           20 November 2008       Pgmcrater User Manual(0)
Impressum