♦
Height Mapping ♦
Phase Mappings ♦

Surface visualizations in the DLMF represent functions of the form $z=f\left(x,y\right)$ by the height $z$ or the magnitude, $\left|z\right|$, for complex functions, over the $x\times y$ plane. We use color to augment these vizualizations, either to reinforce the recognition of the height, or to convey an extra dimension to represent the phase of complex valued functions.

To provide an easily interpreted encoding of surface heights, a rainbow-like mapping of height to color is used. The following figure illustrates the piece-wise linear mapping of the height to each of the color components red, green and blue, written as $\u27e8R,\hspace{0.25em}G,\hspace{0.25em}B\u27e9$.

Mathematically, we scale the height to $h$ lying in the interval $\left[0,4\right]$ and the components are computed as follows

$$ |

By painting the surfaces with a color that encodes the phase, $\mathrm{ph}f$, both the magnitude and phase of complex valued functions can be displayed. We offer two options for encoding the phase.

The four color scheme quickly indicates in which quadrant $z$ lies: the colors blue, green, red and yellow are used to indicate the first, second, third and fourth quadrants, respectively. As a mnemonic, the colors are sorted alphabetically.

For the continuous phase mapping, we map the phase continuously onto the hue, as both are periodic. In doing this, however, we would like to place the mathematically significant phase values, specifically the multiples of $\pi /2$ correponding to the real and imaginary axes, at more immediately recognizable colors.

The conventional CMYK color wheel (not to be confused with the traditional Artist’s color wheel) places the additive colors (red, green, blue) and the subtractive colors (yellow, cyan, magenta) at multiples of 60 degrees. In particular, the colors at 90 and 180 degrees are some vague greenish and purplish hues.

We therefore use a piecewise linear mapping as illustrated below, that takes phase $0$ to red, $\pi /2$ to yellow, $\pi $ to cyan and $3\pi /2$ to blue.

Specifically, by scaling the phase angle in $\left[0,2\pi \right)$ to $q$ in the interval $\left[0,4\right)$, the hue (in degrees) is computed as

$$ |