Complex Function Visualizer

This is a tool to visualize functions from \(\mathbb{C} \to \mathbb{C}\). It was largely inspired by a similar application by David Bau, but was re-implemented using WebGL for improved performance.

Visualization is performed via domain coloring. Each pixel of the screen corresponds to a point in the complex plane, and its color corresponds to the function value at that point. To understand the coloring scheme, the identity function can be plotted. The unit circle is marked with a grey ring, with holes marking \(1\), \(i\), \(-1\), and \(-i\). Phase is represented by hue, while magnitude is represented by value. A grid pattern, with grid size \(\frac{1}{16}\), is also visible.

Arbitrary expressions of the variable \(z\) can be entered into the textbox below in order to visualize them. The syntax should be rather straightforward — a number of examples are shown below:

The variable \(t\) can also be used to plot time-dependent functions. \(t\) will vary between 0 and 1 automatically; it can also be changed manually with an on-screen slider. Here are some examples of time-dependent functions:

In addition to the default domain coloring, points in the complex plane can also be mapped to points on the Earth, and colored accordingly. This mapping, utilizing the Riemann sphere, maps \(0\) to the south pole and \(\infty\) to the north pole. As this method relies on texture data for the earth, it is of much lower resolution than the default coloring, which is generated programatically. Credit goes to mycodingwrongs for the cubemap textures.