261 lines
7.0 KiB
HTML
261 lines
7.0 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of pgmcrater</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>pgmcrater</H1>
|
|
Section: User Commands (1)<BR>Updated: 15 October 1991<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="ixAAB"></A>
|
|
<A NAME="ixAAC"></A>
|
|
<A NAME="ixAAD"></A>
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
pgmcrater - create cratered terrain by fractal forgery
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
<B>pgmcrater</B>
|
|
|
|
<BR>
|
|
|
|
[<B>-number</B>
|
|
|
|
<I>n</I>]
|
|
|
|
[<B>-height</B>|<B>-ysize</B>
|
|
|
|
<I>s</I>]
|
|
|
|
[<B>-width</B>|<B>-xsize</B>
|
|
|
|
<I>s</I>]
|
|
|
|
[<B>-gamma</B>
|
|
|
|
<I>g</I>]
|
|
|
|
|
|
<P>
|
|
|
|
All options can be abbreviated to their shortest unique prefix.
|
|
<P>
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>pgmcrater</B>
|
|
|
|
creates a PGM image which mimics cratered terrain. The PGM image
|
|
is created by simulating the impact of a given number of craters with
|
|
random position and size, then rendering the resulting terrain
|
|
elevations based on a light source shining from one side of the
|
|
screen. The size distribution of the craters is based on a power law
|
|
which results in many more small craters than large ones. The number
|
|
of craters of a given size varies as the reciprocal of the area as
|
|
described on pages 31 and 32 of Peitgen and Saupe[1]; cratered bodies
|
|
in the Solar System are observed to obey this relationship. The
|
|
formula used to obtain crater radii governed by this law from a
|
|
uniformly distributed pseudorandom sequence was developed by Rudy
|
|
Rucker.
|
|
<P>
|
|
|
|
High resolution images with large numbers of craters often benefit
|
|
from being piped through
|
|
<B>pnmsmooth</B>.
|
|
|
|
The averaging performed by this process eliminates some of the jagged
|
|
pixels and lends a mellow ``telescopic image'' feel to the overall
|
|
picture.
|
|
<P>
|
|
<B>pgmcrater</B>
|
|
|
|
simulates only small craters, which are hemispherical in shape
|
|
(regardless of the incidence angle of the impacting body, as long as the
|
|
velocity is sufficiently high). Large craters, such as Copernicus and
|
|
Tycho on the Moon, have a ``walled plain'' shape with a cross-section more
|
|
like:
|
|
<PRE>
|
|
/\ /\
|
|
<BR>
|
|
_____/ \____________/\____________/ \_____
|
|
</PRE>
|
|
|
|
|
|
Larger craters should really use this profile, including the central
|
|
peak, and totally obliterate the pre-existing terrain.
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-number</B><I> n</I>
|
|
|
|
<DD>
|
|
Causes
|
|
<I>n</I>
|
|
|
|
craters to be generated. If no
|
|
<B>-number</B>
|
|
|
|
specification is given, 50000 craters will be generated. Don't expect
|
|
to see them all! For every large crater there are many, many more
|
|
tiny ones which tend simply to erode the landscape. In general, the
|
|
more craters you specify the more realistic the result; ideally you
|
|
want the entire terrain to have been extensively turned over again and
|
|
again by cratering. High resolution images containing five to ten
|
|
million craters are stunning but take quite a while to create.
|
|
<DT id="2"><B>-height</B><I> height</I>
|
|
|
|
<DD>
|
|
Sets the height of the generated image to
|
|
<I>height</I>
|
|
|
|
pixels. The default height is 256 pixels.
|
|
<DT id="3"><B>-width</B><I> width</I>
|
|
|
|
<DD>
|
|
Sets the width of the generated image to
|
|
<I>width</I>
|
|
|
|
pixels. The default width is 256 pixels.
|
|
<DT id="4"><B>-xsize</B><I> width</I>
|
|
|
|
<DD>
|
|
Sets the width of the generated image to
|
|
<I>width</I>
|
|
|
|
pixels. The default width is 256 pixels.
|
|
<DT id="5"><B>-ysize</B><I> height</I>
|
|
|
|
<DD>
|
|
Sets the height of the generated image to
|
|
<I>height</I>
|
|
|
|
pixels. The default height is 256 pixels.
|
|
<DT id="6"><B>-gamma</B><I> factor</I>
|
|
|
|
<DD>
|
|
The specified
|
|
<I>factor</I>
|
|
|
|
is used to gamma adjust the image in the same manner as performed by
|
|
<B>pnmgamma</B>.
|
|
|
|
The default value is 1.0, which results in a medium contrast image.
|
|
Values larger than 1 lighten the image and reduce contrast, while
|
|
values less than 1 darken the image, increasing contrast.
|
|
<P>
|
|
Note that this is separate from the gamma correction that is part of the
|
|
definition of the PGM format. The image
|
|
<B>pnmgamma</B>
|
|
|
|
generates is a genuine, gamma-corrected PGM image in any case. This
|
|
option simply changes the contrast and may compensate for a display
|
|
device that does not correctly render PGM images.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>DESIGN NOTES</H2>
|
|
|
|
The
|
|
<B>-gamma</B>
|
|
|
|
option isn't really necessary since you can achieve the same effect by
|
|
piping the output from
|
|
<B>pgmcrater</B>
|
|
|
|
through
|
|
<B>pnmgamma</B>.
|
|
|
|
However,
|
|
<B>pgmcrater</B>
|
|
|
|
performs an internal gamma map anyway in the process of rendering the
|
|
elevation array into the PGM format, so there's no additional overhead
|
|
in allowing an additional gamma adjustment.
|
|
<P>
|
|
|
|
Real craters have two distinct morphologies.
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+pgm">pgm</A></B>(5),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pnmgamma">pnmgamma</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pnmsmooth">pnmsmooth</A></B>(1)
|
|
|
|
<DL COMPACT>
|
|
<DT id="7">[1]<DD>
|
|
Peitgen, H.-O., and Saupe, D. eds., The Science Of Fractal Images,
|
|
New York: Springer Verlag, 1988.
|
|
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<DL COMPACT><DT id="8"><DD>
|
|
<PRE>
|
|
John Walker
|
|
Autodesk SA
|
|
Avenue des Champs-Montants 14b
|
|
CH-2074 MARIN
|
|
Suisse/Schweiz/Svizzera/Svizra/Switzerland
|
|
<DL COMPACT>
|
|
<DT id="9">Usenet:<DD><A HREF="mailto:kelvin@Autodesk.com">kelvin@Autodesk.com</A>
|
|
<DT id="10">Fax:<DD>038/33 88 15
|
|
<DT id="11">Voice:<DD>038/33 76 33
|
|
</PRE>
|
|
|
|
</DL>
|
|
</DL>
|
|
|
|
|
|
<P>
|
|
|
|
Permission to use, copy, modify, and distribute this software and its
|
|
documentation for any purpose and without fee is hereby granted,
|
|
without any conditions or restrictions. This software is provided ``as
|
|
is'' without express or implied warranty.
|
|
<P>
|
|
|
|
<B>PLUGWARE!</B>
|
|
|
|
If you like this kind of stuff, you may also enjoy ``James Gleick's
|
|
Chaos--The Software'' for MS-DOS, available for $59.95 from your
|
|
local software store or directly from Autodesk, Inc., Attn: Science
|
|
Series, 2320 Marinship Way, Sausalito, CA 94965, USA. Telephone:
|
|
(800) 688-2344 toll-free or, outside the U.S. (415) 332-2344 Ext
|
|
4886. Fax: (415) 289-4718. ``Chaos--The Software'' includes a more
|
|
comprehensive fractal forgery generator which creates
|
|
three-dimensional landscapes as well as clouds and planets, plus five
|
|
more modules which explore other aspects of Chaos. The user guide of
|
|
more than 200 pages includes an introduction by James Gleick and
|
|
detailed explanations by Rudy Rucker of the mathematics and algorithms
|
|
used by each program.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="12"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="13"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="14"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="15"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="16"><A HREF="#lbAF">DESIGN NOTES</A><DD>
|
|
<DT id="17"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
<DT id="18"><A HREF="#lbAH">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:22 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|