-->

Previous | Table of Contents | Next

Page 368

AUTHORS

Copyright " 1988 by James Darrell McCauley (jdm5548@diamond.tamu.edu) and Jef Poskanzer.

2 November 1990

pbmupc

pbmupc—Create a Universal Product Code bitmap

SYNOPSIS


pbmupc [-s1|-s2] type manufac product

DESCRIPTION

pbmupc generates a Universal Product Code symbol. The three arguments are: a one-digit product type, a five-digit manufacturer code, and a five-digit product code. For example, 0 72890 00011 is the code for Heineken.

As presently configured, pbmupc produces a bitmap 230 bits wide and 175 bits high. The size can be altered by changing the defines at the beginning of the program, or by running the output through pnmenlarge or pnmscale.

OPTIONS

The -s1 and -s2 flags select the style of UPC to generate. The default, -s1, looks more or less like this:


||||||||||||||||

||||||||||||||||

||||||||||||||||

||||||||||||||||

0||12345||67890||5

The other style, -s2, puts the product type digit higher up, and doesn't display the checksum digit:


||||||||||||||||

||||||||||||||||

0|||||||||||||||

||||||||||||||||

||12345||67890||

SEE ALSO

pbm(5)

AUTHOR

Copyright " 1989 by Jef Poskanzer.

14 March 1989

pcxtoppm

pcxtoppm—Convert a PCX file into a portable pixmap

SYNOPSIS


pcxtoppm[pcxfile]

DESCRIPTION

pcxtoppm reads a PCX file as input and produces a portable pixmap as output.

Page 369

SEE ALSO

ppmtopcx(1), ppm(5)

AUTHOR

Copyright " 1990 by Michael Davidson.

9 April 1990

pfbtops

pfbtops—Translate a PostScript font in PFB format to ASCII

SYNOPSIS


pfbtops [ pfb_file ]

DESCRIPTION

pfbtops translates a PostScript font in PFB format to ASCII. If pfb_file is omitted, the PFB file will be read from the standard input. The ASCII format PostScript font will be written on the standard output. PostScript fonts for MS-DOS are normally supplied in PFB format.

The resulting ASCII format PostScript font can be used with groff. It must first be listed in /usr/lib/groff/font/devps/download.

SEE ALSO


grops(1)

Groff Version 1.09, 6 August 1992

pgmbentley

pgmbentley—Bentleyize a portable graymap

SYNOPSIS


pgmbentley [pgmfile]

DESCRIPTION

pgmbentley reads a portable graymap as input, performs the Bentley Effect, and writes a portable graymap as output.

The Bentley Effect is described in Beyond Photography by Holzmann, Chapter 4, photo 4. It's a vertical smearing based on brightness.

SEE ALSO

pgmoil(1), ppmrelief(1), pgm(5)

AUTHOR

Copyright " 1990 by Wilson Bent (whb@hoh-2.att.com).

11 January 1991

Page 370

pgmcrater

pgmcrater—Create cratered terrain by fractal forgery

SYNOPSIS


pgmcrater [-number n][-height|-ysize s][-width|-xsize s][-gamma g]

DESCRIPTION

pgmcrater creates a portable graymap that mimics cratered terrain. The graymap 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 that 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 The Science Of Fractal Images, edited by H.O. Peitgen and D. Saupe (New York: Springer-Verlag, 1988). 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.

High resolution images with large numbers of craters often benefit from being piped through pnmsmooth. The averaging performed by this process eliminates some of the jagged pixels and lends a mellow "telescopic image" feel to the overall picture.

OPTIONS

-number n Causes n craters to be generated. If no -number specification is given, 50,000 craters will be generated. Don't expect to see them all! For every large crater, there are many, many more tiny ones that 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.

-height height Sets the height of the generated image to height pixels. The default height is 256 pixels.
-width width Sets the width of the generated image to width pixels. The default width is 256 pixels.
-xsize width Sets the width of the generated image to width pixels. The default width is 256 pixels.
-ysize height Sets the height of the generated image to height pixels. The default height is 256 pixels.
-gamma factor The specified factor is used to gamma correct the graymap in the same manner as performed 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.

All flags can be abbreviated to their shortest unique prefix.

BUGS

The -gamma option isn't really necessary because you can achieve the same effect by piping the output from pgmcrater through pnmgamma. However, pgmcrater performs an internal gamma map anyway in the process of rendering the elevation array into a graymap, so there's no additional overhead in allowing a user-specified gamma.

Real craters have two distinct morphologies. pgmcrater 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:


/\/\

_____/ \_____ /\______/ \______

Larger craters should really use this profile, including the central peak, and totally obliterate the preexisting terrain.

SEE ALSO


pgm(5), pnmgamma(1), pnmsmooth(1)

Previous | Table of Contents | Next