# Domain Coloring Plotter - Complex Functions, Riemann Sphere

> Plot complex functions f(z) by domain coloring: argument as hue, modulus contours, zeros, poles and singularities, with a Riemann sphere view and zoom.

- URL: https://qilingtools.com/en/math/domain-coloring
- Category: Math Tools (https://qilingtools.com/en/math)
- Tags: [Math](https://qilingtools.com/en/tags/math), [Education](https://qilingtools.com/en/tags/education), [Creative Effects](https://qilingtools.com/en/tags/effects)
- Last updated: 2026-10-26
- Price: Free, no sign-up
- Privacy: Runs locally in the browser; files are never uploaded

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).

## How to use

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

## Features

- Complex expression parser: arithmetic, powers, elementary and inverse trig functions, Γ, implicit multiplication
- Five colourings: classic, phase, modulus contours, enhanced phase portrait, conformal grid
- Zeros, poles and essential singularities at a glance; hover shows z, f(z), |f| and arg
- Pan and zoom with labelled axes
- Riemann sphere view by stereographic projection, rotatable to see infinity
- Multi-threaded Web Worker rendering and PNG export

## 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.

## Related tools

- [Graphing Calculator](https://qilingtools.com/en/math/graph): Free online function graphing calculator: type sin(x), x^2 or 1/x and see the curve at once, with several functions, parametric and polar curves, PNG export.
- [Scientific Calculator](https://qilingtools.com/en/math/calculator): Free online scientific calculator: type 2*(3+4)^2, sin(pi/6) or log(8,2) and see the answer as you type, with degrees or radians and a history list.
- [Equation Solver](https://qilingtools.com/en/math/equation): Free online equation solver: enter coefficients for linear, quadratic (with discriminant, vertex and complex roots) and cubic equations, plus 2×2 systems.
- [Fraction Calculator](https://qilingtools.com/en/math/fraction): Free online fraction calculator: add, subtract, multiply and divide fractions with automatic reduction, plus fraction ↔ decimal with repeating digits.
- [Percentage Calculator](https://qilingtools.com/en/math/percentage): Free online percentage calculator: X% of Y, X as a percent of Y, increase and decrease, a value after a percentage change and the original behind it.
- [Prime Factorization](https://qilingtools.com/en/math/prime): Free online prime factorization: factor an integer with exponents, list every divisor and their sum, test primality with neighbouring primes, or list a range.
- [GCD and LCM](https://qilingtools.com/en/math/gcd-lcm): Free online GCD and LCM calculator: works with two or more integers, says whether they are coprime, shows each prime factorization and every Euclidean step.
- [Statistics Calculator](https://qilingtools.com/en/math/statistics): Free online statistics calculator: paste a data set for the mean, median, mode, range, quartiles, variance, standard deviation, standard error and outliers.
