Geoscience Reference
In-Depth Information
4.4 Color ramps: Alternate metrics
The problem of finding color ramps linking one color to another can be
captured simply as follows. To find a ramp joining two colors, A and B , first
represent each of A and B as an ordered triple in color voxel space. Then, the
problem becomes one of “find a path from A to B .” Because one is limited to
integer-only arithmetic, divisibility of distances often will not be precise; thus,
one is thrown from the continuous realm of the Euclidean metric into consid-
ering the non-Euclidean realm of the Manhattan metric (of square pixel/cubic
voxel space). The algorithms for finding shortest paths between two arbitrary
points using integer-only arithmetic will therefore apply to colors mapped in
color space as well as to physical locations mapped on city grids (as so-called
Manhattan space). To see how these ideas might play out with colors, we con-
sider an example that will lead to an animated color ramp.
Find a path through color voxel space from (80, 100, 120), shown in Figure
4.5a as a medium green to (200, 160, 60), shown as a fairly deep purple in
Figure 4.5b . One set of points through which to pass, spaced evenly (not
always possible), is given in the table below. The left-hand column shows
the values of hue, the middle column shows the values of saturation, and the
right-hand column shows the values of luminosity.
80
100
120
90
105
115
100
110
110
110
115
105
120
120
100
130
125
95
140
130
90
150
135
85
160
140
80
170
145
75
180
150
70
190
155
65
200
160
60
Figure 4.6 shows a screen capture and a QR code leading to an animation
using the path outlined in the table above. The crosshairs show the movement
along the path while the flashing color in the rectangle below the color map
shows the associated color ramp. Clearly, the choice of path is not unique:
Geodesics are not unique in Manhattan space. From this analysis, we see that
the following theorem will hold.
Theorem: The determination of color ramps joining two colors is abstractly
equivalent to finding paths in Manhattan space between two arbitrary points
(where geodesics are not unique) (Arlinghaus and Arlinghaus, 1999).
Search WWH ::




Custom Search