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