ppmglobe
Visualize PPM images on a rotating globe
TLDR
Transform an image to strips that can be cut out and glues onto a sphere
Use the specified color for the areas between the strips
SYNOPSIS
ppmglobe [options] heightmap.pgm
PARAMETERS
-radius
Specifies the radius of the globe in pixels. The default is half the width of the heightmap.
-x
X coordinate of the light source. The default is -1.
-y
Y coordinate of the light source. The default is -1.
-z
Z coordinate of the light source. The default is 1.
-width
Specifies the width of the output image in pixels. The default is the width of the heightmap.
-height
Specifies the height of the output image in pixels. The default is the height of the heightmap.
DESCRIPTION
The `ppmglobe` command generates a shaded globe image from elevation data, usually a heightmap. It simulates a 3D globe by using the elevation data to create shading effects, giving the image a realistic appearance. The output is a Portable Pixmap (PPM) image. The command allows for customization of the light source position, globe radius, and image dimensions. It's useful for visualizing geographical data or creating artistic renderings of planetary surfaces. The input data is assumed to be normalized to a certain range where higher pixel values correspond to higher elevations. The resulting image can then be displayed using a variety of image viewers.
CAVEATS
The quality of the generated image depends heavily on the quality and resolution of the input heightmap. The light source parameters significantly affect the shading and appearance of the globe.
INPUT HEIGHTMAP FORMAT
The input heightmap must be a PGM (Portable Graymap) image. Each pixel in the PGM image represents an elevation value. White pixels are usually interpreted as the highest elevation, and black pixels as the lowest. It is important to consider the range of elevation values represented in the heightmap when interpreting the output.
LIGHT SOURCE
The -x, -y, and -z parameters determine the position of the light source relative to the globe. Changing these values can significantly alter the shading and appearance of the final image. Experimentation is often necessary to achieve the desired effect.
TROUBLESHOOTING
If the globe appears excessively dark or washed out, adjust the x,y,z coordinate of the light source. Make sure that the heightmap image is a valid PGM file.
HISTORY
ppmglobe
is part of the Netpbm suite, a collection of graphics manipulation tools. It was developed as a utility to easily create visualizations of heightmap data in a visually appealing way. The development aimed to provide a simple command-line interface for generating globe-like images.
SEE ALSO
pgm(5), ppm(5)