about summary refs log tree commit diff
path: root/pgmcrater.html
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-07-26 21:25:32 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-07-26 21:25:32 +0000
commitdb5bf0f8bb59b9f7e05fce40afc03e6f071138de (patch)
tree8697007439e3b0fd434ed3119e4509679725b4a2 /pgmcrater.html
parent6c4af97b085e04914d39e928768b59d331f404f2 (diff)
downloadnetpbm-mirror-db5bf0f8bb59b9f7e05fce40afc03e6f071138de.tar.gz
netpbm-mirror-db5bf0f8bb59b9f7e05fce40afc03e6f071138de.tar.xz
netpbm-mirror-db5bf0f8bb59b9f7e05fce40afc03e6f071138de.zip
miscellaneous update
git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@2228 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'pgmcrater.html')
-rw-r--r--pgmcrater.html196
1 files changed, 29 insertions, 167 deletions
diff --git a/pgmcrater.html b/pgmcrater.html
index df57dfe1..eb0ae703 100644
--- a/pgmcrater.html
+++ b/pgmcrater.html
@@ -2,12 +2,11 @@
 <HTML><HEAD><TITLE>Pgmcrater User Manual</TITLE></HEAD>
 <BODY>
 <H1>pgmcrater</H1>
-Updated: 20 November 2008
+Updated: 26 July 2014
 <BR>
 <A HREF="#index">Table Of Contents</A>
 
-<H2>NAME</H2>
-
+<H2 id="name">NAME</H2>
 pgmcrater - create cratered terrain by fractal forgery
 
 <H2 id="synopsis">SYNOPSIS</H2>
@@ -24,189 +23,52 @@ pgmcrater - create cratered terrain by fractal forgery
 
 [<b>-randomseed=</b><i>integer</i>]
 
+<P>
+All options can be abbreviated to their shortest unique prefix.  You
+may use two hyphens instead of one to designate an option.  You may
+use either white space or equals signs between an option name and its
+value.
+
 
 <H2 id="description">DESCRIPTION</H2>
 
 <p>This program is part of <a href="index.html">Netpbm</a>.
 
-<P><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>The randomness in the image is limited before Netpbm 10.37 (December
-2006) -- if you run the program twice in the same second, you may get
-identical output.
-
-<H2 id="options">OPTIONS</H2>
-
-<P>All options can be abbreviated to their shortest unique prefix.
-
-<DL COMPACT>
-<DT><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><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><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><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><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><B>-gamma</B> <I>factor</I>
+<p><b>pgmcrater</b> is obsolete.  All it does now is invoke
+<b>pamcrater</b>, <b>pamshadedrelief</b>, and <b>pamtopnm</b>.  You should use
+those programs in any new application, or if you are modifying an old program
+or process that does not have to work with a version of Netpbm before 10.68
+(September 2014).  <b>pgmcrater</b> exists only for backward compatibility.
 
-<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>The combination of the three programs mentioned above performs the same
+function as traditional <b>pgmcrater</b>.
 
-<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><b>pgmcrater</b>'s <b>-number</b>, <b>-height</b>, <b>-width</b>,
+and <b>-randomseed</b> options are equivalent to the options of the same name
+on <b>pamcrater</b>.
 
-<dt><b>-randomseed=</b><i>integer</i>
+<P><b>pgmcrater</b>'s <b>-gamma</b> option is equivalent to
+the option of the same name on <b>pamshadedrelief</b>.
 
-<dd>This is the seed for the random number generator that generates the
-pixels.
+<P><B>pgmcrater</B>'s <b>-ysize</b> option is identical to <b>-height</b>;
+<b>-xsize</b> is identical to <b>-width</b>.
 
-<p>Use this to ensure you get the same image on separate invocations.
+<p>Note: The former <b>pgmcrater</b> code was split into <b>pamcrater</b>
+and <b>pamshadedrelief</b>.  The reason for the split is that having separate
+programs is more consistent with Netpbm's building block philosophy.  It is
+possible the separate components can be used in other applications.
 
-<p>By default, <b>pgmnoise</b> uses a seed derived from the time of day
-and process ID, which gives you fairly uncorrelated results in multiple
-invocations.
-
-<p>This option was new in Netpbm 10.61 (December 2012).
-
-</DL>
-
-<H2 id="designnotes">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.
 
 <H2 id="seealso">SEE ALSO</H2>
+<B><A HREF="pamcrater.html">pamcrater</A></B>,
+<B><A HREF="pamshadedrelief.html">pamshadedrelief</A></B>,
+<B><A HREF="pamtopnm.html">pamtopnm</A></B>,
 
-<B><A HREF="pnmgamma.html">pnmgamma</A></B>,
-
-<B><A HREF="pnmsmooth.html">pnmsmooth</A></B>
-
-<B><A HREF="pgm.html">pgm</A></B>,
-
-<DL COMPACT>
-<DT>[1]
-<DD>Peitgen, H.-O., and Saupe, D. eds., The Science Of Fractal Images,
-New York: Springer Verlag, 1988.
-
-</DL>
-
-<A NAME="lbAH">&nbsp;</A>
-<H2>AUTHOR</H2>
-
-<PRE>
-John Walker
-Autodesk SA
-Avenue des Champs-Montants 14b
-CH-2074 MARIN
-Suisse/Schweiz/Svizzera/Svizra/Switzerland
-    <B>Usenet:</B><A HREF="mailto:kelvin@Autodesk.com">kelvin@Autodesk.com</A>
-    <B>Fax:</B>038/33 88 15
-    <B>Voice:</B>038/33 76 33
-</PRE>
-
-<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
-&quot;as is&quot; without express or implied warranty.
-
-<H2 id="history">HISTORY</H2>
-
-
-<P>The original 1991 version of this manual contains the following:
-
-<h3>PLUGWARE!</h3>
-
-<p>If you like this kind of stuff, you may also enjoy &quot;James Gleick's
-Chaos--The Software&quot; 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.  &quot;Chaos--The Software&quot; 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.
-
-<HR>
 <H2 id="index">Table Of Contents</H2>
 <UL>
 <LI><A HREF="#synopsis">SYNOPSIS</A>
 <LI><A HREF="#description">DESCRIPTION</A>
-<LI><A HREF="#options">OPTIONS</A>
-<LI><A HREF="#designnotes">DESIGN NOTES</A>
 <LI><A HREF="#seealso">SEE ALSO</A>
-<LI><A HREF="#author">AUTHOR</A>
-<LI><A HREF="#history">HISTORY</A>
 </UL>
 </BODY>
 </HTML>