summary refs log tree commit diff
path: root/ppmglobe.html
blob: 1909b7966bf56ee4c0352a707b03ac75caa861c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Ppmglobe User Manual</title></head>
<body>
<h1>ppmglobe</h1>
Updated: 23 February 2006
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>
ppmglobe - generate strips to glue onto a sphere

<h2 id="synopsis">SYNOPSIS</h2>

<b>ppmglobe</b>
[<b>-background=</b><i>colorname</i>]
[<b>-closeok</b>]
<i>stripcount</i>
[<i>filename</i>]

<p>Minimum unique abbreviation of option is acceptable.  You may use double
hyphens instead of single hyphen to denote options.  You may use white
space in place of the equals sign to separate an option name from its value.


<h2 id="description">DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p><b>ppmglobe</b> does the inverse of a cylindrical projection of a
sphere.  Starting with a cylindrical projection, it produces an image
you can cut up and glue onto a sphere to obtain the spherical image of
which it is the cylindrical projection.

<p>What is a cylindrical projection?  Imagine a map of the Earth on flat
paper.  There are lots of different ways cartographers show the three
dimensional information in such a two dimensional map.  The cylindrical
projection is one.  You could make a cylindrical projection by tracing as
follows: wrap a rectangular sheet of paper around the globe, touching the globe
at the Equator.  For each point of color on the globe, run a horizontal line
from the axis of the globe through that point and out to the paper.  Mark the
same color on the paper there.  Lay the paper out flat and you have a
cylindrical projection.

<p>Here's where <b>ppmglobe</b> comes in:  Pass the image on that paper
through <b>ppmglobe</b> and what comes out the other side looks something
like this:

<p>
<img src="globe.jpg" alt="Example of map of the earth run through ppmglobe">

<p>You could cut out the strips and glue it onto a sphere and you'd
have a copy of the original globe.

<p>Note that cylindrical projections are not what you normally see as
maps of the Earth.  You're more likely to see a Mercator projection.
In the Mercator projection, the Earth gets stretched North-South as
well as East-West as you move away from the Equator.  It was invented
for use in navigation, because you can draw straight compass courses
on it, but is used today because it is pretty.

<p>You can find maps of planets at <a
href="http://maps.jpl.nasa.gov">maps.jpl.nasa.gov</a>.

<h2 id="parameters">PARAMETERS</h2>

<p><i>stripcount</i> is the number of strips <b>ppmglobe</b> is to
generate in the output.  More strips makes it easier to fit onto a
sphere (less stretching, tearing, and crumpling of paper), but makes
you do more cutting out of the strips.

<p>The strips are all the same width.  If the number of columns of
pixels in the image doesn't evenly divide by the number of strips,
<b>ppmglobe</b> truncates the image on the right to create nothing but
whole strips.  In the pathological case that there are fewer columns
of pixels than the number of strips you asked for, <b>ppmglobe</b>
fails.

<p>Before Netpbm 10.32 (February 2006), instead of truncating the image
on the right, <b>ppmglobe</b> produces a fractional strip on the right.

<p><i>filename</i> is the name of the input file.  If you don't
specify this, <b>ppmglobe</b> reads the image from Standard Input.


<h2 id="options">OPTIONS</h2>

<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>ppmglobe</b> recognizes the following
command line options:

<dl compact>

<dt><b>-background=</b><i>colorname</i>
<dd>
This specifies the color that goes between the strips.

<p>Specify the color (<i>color</i>) as described for the <a
href="libnetpbm_image.html#colorname">argument of the <b>pnm_parsecolor()</b>
library routine</a>.

<p>The default is black.

<p>This option was new in Netpbm 10.31 (December 2005).  Before that,
the background is always black.

<dt><b>-closeok</b>
<dd>
This means it is OK if the background isn't exactly the color you specify.
Sometimes, it is impossible to represent a named color exactly because of the
precision (i.e. maxval) of the image's color space.  If you specify
<b>-closeok</b> and <b>ppmglobe</b> can't represent the color you name
exactly, it will use instead the closest color to it that is possible.
If you don't specify <b>closeok</b>, <b>ppmglobe</b> fails in that
situation.

<p>This option was new in Netpbm 10.31 (December 2005).

</dl>

<h2 id="seealso">SEE ALSO</h2>

<b><a href="ppm.html">ppm</a></b>
<b><a href="pnmmercator.html">pnmmercator</a></b>

<h2 id="history">HISTORY</h2>

<p><b>ppmglobe</b> was new in Netpbm 10.16 (June 2003).

<p>It is derived from Max Gensthaler's <b>ppmglobemap</b>.

<h2 id="authors">AUTHORS</h2>

<p><a href="mailto:Max@Gensthaler.de">Max Gensthaler</a>
wrote a program he called
<b>ppmglobemap</b> in June 2003 and suggested it for inclusion in
Netpbm.  Bryan Henderson modified the code slightly and included it in
Netpbm as <b>ppmglobe</b>.

<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#parameters">PARAMETERS</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#history">HISTORY</a>
<li><a href="#authors">AUTHORS</a>
</ul>
</body>
</html>