mercator.icn: Program to display surface of HLS color cones

July 23, 1998; Gregg M. Townsend
Requires: Version 9 graphics
This file is in the public domain.
Usage:  mercator [window options] [palette]

   Mercator displays the surface of the HLS color space (hue,
lightness, saturation) in something approximating a Mercator
projection.   The white pole is at the top, the black pole is
at the bottom, and the fully saturated colors run along the
central equator.

   Colors are usually quantized to one of Icon's color palettes,
with the "c1" palette being the default.  Specifying a palette
of "none" inhibits quantization, generally leading to poor results
due to color allocation failure.
____________________________________________________________

   Calling this a mercator projection is not exactly correct.
The first problem is that HLS space is a double cone, not a
sphere, but that can be disregarded by mapping hue to longitude
and lightness to latitude.  Even so, the projection is not truly
a Mercator projection, but rather another member of the cylindrical
family:  a rectangular, or equidistant cylindrical, projection.

Source code | Program Library Page | Icon Home Page