{
    "content": [
        {
            "type": "text",
            "text": "# pgmcrater (man)\n\n## NAME\n\npgmcrater - create cratered terrain by fractal forgery\n\n## SYNOPSIS\n\npgmcrater [-number n] [-height|-ysize s] [-width|-xsize s] [-gamma g]\nAll options can be abbreviated to their shortest unique prefix.\n\n## DESCRIPTION\n\npgmcrater  creates  a  PGM  image which mimics cratered terrain.  The PGM image is created by\nsimulating the impact of a given number of craters with random position and size,  then  ren‐\ndering  the resulting terrain elevations based on a light source shining from one side of the\nscreen.  The size distribution of the craters is based on a power law which results  in  many\nmore  small craters than large ones.  The number of craters of a given size varies as the re‐\nciprocal of the area as described on pages 31 and 32 of Peitgen and Saupe[1]; cratered bodies\nin  the  Solar  System  are  observed  to obey this relationship.  The formula used to obtain\ncrater radii governed by this law from a uniformly distributed pseudorandom sequence was  de‐\nveloped by Rudy Rucker.\n\n## TLDR\n\n> This command has been superseded by `pamcrater`, `pamshadedrelief`, and `pamtopnm`.\n\n- View documentation for `pamcrater`:\n  `tldr pamcrater`\n- View documentation for `pamshadedrelief`:\n  `tldr pamshadedrelief`\n- View documentation for `pamtopnm`:\n  `tldr pamtopnm`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (6 subsections)\n- **DESIGN NOTES**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pgmcrater",
        "section": "",
        "mode": "man",
        "summary": "pgmcrater - create cratered terrain by fractal forgery",
        "synopsis": "pgmcrater [-number n] [-height|-ysize s] [-width|-xsize s] [-gamma g]\nAll options can be abbreviated to their shortest unique prefix.",
        "tldr_summary": "This command has been superseded by `pamcrater`, `pamshadedrelief`, and `pamtopnm`.",
        "tldr_examples": [
            {
                "description": "View documentation for `pamcrater`",
                "command": "tldr pamcrater"
            },
            {
                "description": "View documentation for `pamshadedrelief`",
                "command": "tldr pamshadedrelief"
            },
            {
                "description": "View documentation for `pamtopnm`",
                "command": "tldr pamtopnm"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "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 stun‐ ning but take quite a while to create."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Sets the height of the generated image to height pixels. The default height is 256 pixels."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Sets the width of the generated image to width pixels. The default width is 256 pixels."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Sets the width of the generated image to width pixels. The default width is 256 pixels."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Sets the height of the generated image to height pixels. The default height is 256 pixels."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "The specified factor is used to gamma adjust the image in the same manner as per‐ formed by pnmgamma. 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. Note that this is separate from the gamma correction that is part of the definition of the PGM format. The image pnmgamma 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."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "pgm",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pgm/5/json"
            },
            {
                "name": "pnmgamma",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmgamma/1/json"
            },
            {
                "name": "pnmsmooth",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmsmooth/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-number -number",
                        "lines": 7
                    },
                    {
                        "name": "-height",
                        "lines": 3
                    },
                    {
                        "name": "-width",
                        "lines": 3
                    },
                    {
                        "name": "-xsize",
                        "lines": 3
                    },
                    {
                        "name": "-ysize",
                        "lines": 3
                    },
                    {
                        "name": "-gamma",
                        "lines": 11
                    }
                ]
            },
            {
                "name": "DESIGN NOTES",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 26,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pgmcrater - create cratered terrain by fractal forgery\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pgmcrater [-number n] [-height|-ysize s] [-width|-xsize s] [-gamma g]\n\nAll options can be abbreviated to their shortest unique prefix.\n\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "pgmcrater  creates  a  PGM  image which mimics cratered terrain.  The PGM image is created by\nsimulating the impact of a given number of craters with random position and size,  then  ren‐\ndering  the resulting terrain elevations based on a light source shining from one side of the\nscreen.  The size distribution of the craters is based on a power law which results  in  many\nmore  small craters than large ones.  The number of craters of a given size varies as the re‐\nciprocal of the area as described on pages 31 and 32 of Peitgen and Saupe[1]; cratered bodies\nin  the  Solar  System  are  observed  to obey this relationship.  The formula used to obtain\ncrater radii governed by this law from a uniformly distributed pseudorandom sequence was  de‐\nveloped by Rudy Rucker.\n\nHigh  resolution  images with large numbers of craters often benefit from being piped through\npnmsmooth.  The averaging performed by this process eliminates some of the jagged pixels  and\nlends a mellow ``telescopic image'' feel to the overall picture.\n\npgmcrater  simulates  only small craters, which are hemispherical in shape (regardless of the\nincidence angle of the impacting body, as long as the velocity is sufficiently high).   Large\ncraters,  such  as  Copernicus  and  Tycho  on the Moon, have a ``walled plain'' shape with a\ncross-section more like:\n/\\                            /\\\n/  \\/\\/  \\\nLarger craters should really use this profile, including the central peak, and totally oblit‐\nerate the pre-existing terrain.\n\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-number -number",
                        "content": "craters will be generated.  Don't expect to see them all!  For every  large  crater\nthere  are  many, many more tiny ones which tend simply to erode the landscape.  In\ngeneral, the more craters you specify the more realistic the  result;  ideally  you\nwant  the  entire  terrain  to have been extensively turned over again and again by\ncratering.  High resolution images containing five to ten million craters are stun‐\nning but take quite a while to create.\n"
                    },
                    {
                        "name": "-height",
                        "content": "Sets the height of the generated image to height pixels.  The default height is 256\npixels.\n"
                    },
                    {
                        "name": "-width",
                        "content": "Sets the width of the generated image to width pixels.  The default  width  is  256\npixels.\n"
                    },
                    {
                        "name": "-xsize",
                        "content": "Sets  the  width  of the generated image to width pixels.  The default width is 256\npixels.\n"
                    },
                    {
                        "name": "-ysize",
                        "content": "Sets the height of the generated image to height pixels.  The default height is 256\npixels.\n"
                    },
                    {
                        "name": "-gamma",
                        "content": "The  specified  factor is used to gamma adjust the image in the same manner as per‐\nformed by pnmgamma.  The default value is 1.0, which results in a  medium  contrast\nimage.   Values  larger  than 1 lighten the image and reduce contrast, while values\nless than 1 darken the image, increasing contrast.\n\nNote that this is separate from the gamma correction that is part of the definition\nof  the PGM format.  The image pnmgamma generates is a genuine, gamma-corrected PGM\nimage in any case.  This option simply changes the contrast and may compensate  for\na display device that does not correctly render PGM images.\n\n"
                    }
                ]
            },
            "DESIGN NOTES": {
                "content": "The  -gamma option isn't really necessary since you can achieve the same effect by piping the\noutput from pgmcrater through pnmgamma.  However, pgmcrater performs an  internal  gamma  map\nanyway in the process of rendering the elevation array into the PGM format, so there's no ad‐\nditional overhead in allowing an additional gamma adjustment.\n\nReal craters have two distinct morphologies.\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "pgm(5), pnmgamma(1), pnmsmooth(1)\n\n[1]  Peitgen, H.-O., and Saupe, D. eds., The Science Of Fractal Images,  New  York:  Springer\nVerlag, 1988.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "John Walker\nAutodesk SA\nAvenue des Champs-Montants 14b\nCH-2074 MARIN\nSuisse/Schweiz/Svizzera/Svizra/Switzerland\nUsenet:  kelvin@Autodesk.com\nFax:     038/33 88 15\nVoice:   038/33 76 33\n\nPermission  to  use, copy, modify, and distribute this software and its documentation for any\npurpose and without fee is hereby granted, without  any  conditions  or  restrictions.   This\nsoftware is provided ``as is'' without express or implied warranty.\n\nPLUGWARE!   If  you  like  this kind of stuff, you may also enjoy ``James Gleick's Chaos--The\nSoftware'' for MS-DOS, available for $59.95 from your local software store or  directly  from\nAutodesk,  Inc.,  Attn:  Science Series, 2320 Marinship Way, Sausalito, CA 94965, USA.  Tele‐\nphone: (800) 688-2344 toll-free or, outside the U.S. (415) 332-2344  Ext  4886.   Fax:  (415)\n289-4718.   ``Chaos--The  Software''  includes a more comprehensive fractal forgery generator\nwhich creates three-dimensional landscapes as well as clouds and planets, plus five more mod‐\nules which explore other aspects of Chaos.  The user guide of more than 200 pages includes an\nintroduction by James Gleick and detailed explanations by Rudy Rucker of the mathematics  and\nalgorithms used by each program.\n\n\n\n15 October 1991                              pgmcrater(1)",
                "subsections": []
            }
        }
    }
}