Complex Function Viewer

This tool visualizes any complex-valued function as a conformal map by assigning a color to each point in the complex plane according to the function's value at that point.

Enter any expression in z.

The identity function z shows how colors are assigned: a gray ring at |z| = 1 and a black and white circle around any zero and colored circles around 1, i, -1, and -i. Checkers cover the plane in a 1/16th unit grid. Colors are turquoise in the positive direction, red in the negative, gold-green towards +i, purplish towards -i, and darker towards infinity. There is also a colored circle towards infinity at |z| > 16 that can be seen at any pole towards infinity such as in 1/z.

Here are some example functions to try:

z^2

zz*

(z+1)/(z-1)

sin(z)

e^z

log(z)

sech(z)

arctan(z)

z^3-1

0.926(z +7.3857e-2 z^5 +4.5458e-3 z^9)

Jacobi elliptic sn(z, 0.3)

Gamma function gamma(z)

Iterated function iter(z+z'^2,z,12)

Conformal Maps on the Globe

Conformal maps have their history in 18th century mapmaking, when new mathematical developments allowed mapmakers to understand how to precisely eliminate local shape distortions in maps. Click the ⊕ button in the lower right corner to switch to a conformal mapping of the surface of the earth. Conformal maps preserve local angles everywhere, although they may distort sizes to do so.

The Mercator projection is an example. Try:

e^iz

The azimuthal stereographic projection is a beautiful ancient technique that is also conformal, but it is usually broken into two hemispheres:

...i(z+1-i)/(z+1+i)...

Lagrange advocated another conformal projection that squeezes the entire globe into a single circle:

(disk(z)(z-i) /(z+i))^2

Read more about conformal projections in cartography on Carlos A. Furuti's nicely illustrated mapmaking website . Or Donald Fenna's mathematical mapmaking book, Cartographic Science .

Animating Conformal Maps

To visualize the relationships within families of complex functions, parameterize them with the variables t, u, s, r, or n. The tool will render a range of complex functions for values of the parameter, adjustable with a slider or shown in an aimation. The parameter t will vary linearly from 0 to 1; u will circle through complex units; s follows a sine wave between -1 and 1; r follows a sine wave from 0 to 1 and back; and n counts integers from 1 to 60.

For example, to see the relationship between z^3 and z^3+1, simply view:

z^3+t

On the globe, multiplying by powers of unity will rotate the world on its axis:

u(z-i)/(z+i)

Because more than 300 frames are computed, parameterized expressions can take a long time to fully render. A rough, blurry sketch is drawn quickly, and finer-grained rendering will follow for several minutes. When done, the frames will be antialiased and animated at 24 fps.

Simple families of rational function produce mesmerizing animations:

z^2+s

z^3+1+u

z^5+uz+1

z^2/(r+z)



Iterated functions and sums can also be animated. For example, the following are well-known Taylor series for e^z, sin(z), 1/(1-z), and log(1-z):

sum(z^n/n!)

sum((-1)^n/(2n+1)! z^(2n+1))

sum(z^n)

sum(z^(n+1)/(n+1))



The radii of convergence can clearly be seen in the last two examples

tool by David Bau