QiLing Tools

🎇Domain Coloring Plotter - Complex Functions, Riemann Sphere

A complex function f(z) maps a plane to a plane, so it can’t be drawn as a curve. Domain coloring paints every point z with the colour of f(z) instead: the hue shows the argument arg f (red 0°, yellow 60°, green 120°, cyan 180°, blue 240°, magenta 300°) and the brightness shows the modulus |f|. Zeros and poles then appear as points where all the colours meet — red→yellow→green→blue counter-clockwise around a zero, the reverse around a pole — and the number of colour cycles gives the order. Write functions with + − × ÷ ^, exp, log, sqrt, sin, cos, tan, sinh, cosh, tanh, asin, acos, atan, gamma, conj, abs, arg, Re and Im, the constants i, pi and e, and implicit multiplication such as 2z or (z+1)(z−1). Five colourings are available: classic (zeros black, poles white), phase only, phase with logarithmic modulus contours (one line each time |f| doubles), the enhanced phase portrait with extra isochromatic lines, and a conformal grid showing integer lines of Re f and Im f so you can see angles being preserved. Drag to pan, scroll or pinch to zoom and hover to read z and f(z); the Riemann sphere view puts ∞ at the north pole by stereographic projection, so the pole of a polynomial at infinity or the essential singularity of exp(1/z) at 0 is easy to see. Rendering runs in parallel Web Workers and exports to PNG, with examples such as z³−1, (z²−1)(z−2−i)²/(z²+2+2i), exp(1/z), sin z and Γ(z).

Free · No sign-up · Runs in your browserLast updated:

Loading tool...

How to use Complex Function Plotter (Domain Coloring)

  1. 1Type a function in the f(z) box or click an example
  2. 2Choose a colouring: classic, phase, modulus contours, enhanced phase portrait or conformal grid
  3. 3Drag to pan, scroll to zoom and hover for values, or switch to the Riemann sphere
  4. 4Locate the zeros and poles and their orders, then export a PNG

FAQ

How do I tell zeros from poles in the picture?
Look for points where every colour meets and walk around one counter-clockwise. If the colours go red→yellow→green→cyan→blue→magenta it is a zero; if they go the other way it is a pole. The number of full colour cycles is the order, so (z−2−i)² shows two cycles. In classic mode zeros are black and poles white, and modulus contours bunch up around both.
Why does exp(1/z) look so wild near 0?
z = 0 is an essential singularity of exp(1/z), neither a zero nor a pole. By the great Picard theorem, in every small neighbourhood of 0 the function takes every complex value except 0 infinitely often, so colour and brightness oscillate ever faster towards the origin. Zoom in and the pattern keeps repeating at smaller scales — the hallmark of an essential singularity.
What is the Riemann sphere view for?
Stereographic projection wraps the whole complex plane plus the point at infinity onto a sphere: the south pole is 0, the north pole is ∞ and the equator is the unit circle. You can see directly how a function behaves at infinity — a polynomial of degree n has a pole of order n at the north pole, while a Möbius map such as (z−1)/(z+1) has exactly one zero and one pole, neatly placed.
Why do log and sqrt have a line where the colour jumps?
The complex logarithm and square root are multi-valued, and the tool uses the principal branch with the argument in (−π, π]. That puts a branch cut along the negative real axis, where the colour jumps abruptly. It isn’t a bug, just the price of choosing a single-valued branch. The colour wheels of the gamma function at 0, −1, −2… are its simple poles.