Complexplorer
Complexplorer turns a complex function into something you can look at — and, if you want, hold. It draws phase portraits and enhanced domain colorings, lifts them into 3D landscapes, onto the Riemann sphere, and onto the Riemann surfaces of multivalued functions, and exports the results as STL files for 3D printing.

Highlights:
- Phase portraits and domain coloring with phase-wheel legends, on rectangle, disk, and annulus domains that combine with set operations.
- 3D analytic landscapes and the Riemann sphere, rendered with PyVista.
- Riemann surfaces — multivalued functions such as √z and log z unfolded onto their sheets.
- Perceptual colormap families (OkLCh, cubehelix) and ten modulus transfer functions for reading phase and modulus accurately.
- Engineering mode — transfer functions H(s) and H(z) as pole–zero maps, Bode plots, and Nyquist diagrams.
- STL export for printable ornaments, including six polyhedral presets with full Platonic rotation symmetry.
- A function-preset catalog and a command-line interface for rendering without writing code.
Recent releases
3.1.0 — 26 September 2026. Ornament geometry. Surfaces are now normalized so that arbitrary constants in a function no longer change the printed shape; the default transfer is logarithmic, and new pointiness and contrast controls tune how sharp the tips are. Six polyhedral ornament presets, built from Klein’s relative invariants, carry full tetrahedral, octahedral, or icosahedral symmetry. size_mm now measures true tip-to-tip width, and exported STL meshes are closed with consistent outward normals. Default geometry changed from 3.0 — see the migration guide.
3.0.0 — 19 September 2026. A full modernization: PyVista as the single 3D backend, Riemann surfaces, perceptual colormaps, the function catalog, engineering mode, a CLI, a typed public API, and a documentation site (migration guide).
Full notes are on the releases page.
Gallery
The same ideas read several ways — from a flat phase portrait, to modulus contours, to functions on the Riemann sphere and their Riemann surfaces, to a physical object on a desk.
The magic of complex numbers
The library takes its spirit from a passage that argues complex numbers are not a convenient fiction but something woven into nature itself:
We cannot directly see the minute details of a Dedekind cut, nor is it clear that arbitrarily great or arbitrarily tiny times or lengths actually exist in nature. One could say that the so-called ‘real numbers’ are as much a product of mathematicians’ imaginations as are the complex numbers. Yet we shall find that complex numbers, as much as reals, and perhaps even more, find a unity with nature that is truly remarkable. It is as though Nature herself is as impressed by the scope and consistency of the complex-number system as we are ourselves, and has entrusted to these numbers the precise operations of her world at its minutest scales. …
Moreover, to refer just to the scope and to the consistency of complex numbers does not do justice to this system. There is something more which, in my view, can only be referred to as ‘magic’.
— Sir Roger Penrose, The Road to Reality, Ch. 4: “Magical Complex Numbers”