Overview

Visualizing complex functions is inherently challenging: the complex plane is already two-dimensional, so a function requires four dimensions for a complete Cartesian graph. To overcome this, colour-coded points in 2D space represent different complex numbers, and a transformation is animated as points smoothly interpolating from the domain to the image of the function.
This project explores various complex transformations — including powers, reciprocals, and combinations — and their geometric effects on grids and scattered point clouds. Two coordinate systems are used: Cartesian grids (colour based on the real coordinate) and Polar grids (colour based on magnitude), each rendered as either discrete dots or continuous lines.
Controls: left click to trigger the animation, scroll to zoom, and middle button to pan the viewport.
Mathematical Background
Complex Transformations
A complex transformation is a function that maps each point in the domain to a new point in the image. The geometric effect — rotation, scaling, inversion, or distortion — depends on the algebraic form of .
The functions implemented in this project include:
Each function produces a distinct geometric signature: the power map multiplies the argument by and raises the modulus to the -th power, while the reciprocal performs a circle inversion combined with a conjugation.
Visualization Methods
Four visualization modes are available, combining two coordinate systems with two rendering styles. Each mode colours points differently: Cartesian modes map the -coordinate to a colour gradient, while Polar modes map the magnitude to colour. The animation interpolates each point from its original position to its transformed position under .
Cartesian Dots
Thousands of randomly scattered dots fill the complex plane, each coloured by its real coordinate. When the transformation is applied, the cloud of dots flows to new positions, revealing how the function stretches, compresses, and rotates different regions of the plane.
Cartesian Lines
A regular Cartesian grid of horizontal and vertical lines is drawn, with colour varying along the -axis. Under the transformation, straight lines warp into curves, making it easy to identify conformal properties — angles between grid lines are preserved by analytic functions.
Polar Dots
Dots are distributed across the plane and coloured by their magnitude . This highlights how the transformation affects distance from the origin — inversions swap near and far points, while power maps expand or compress radial distances non-linearly.
Polar Lines
Concentric circles and radial rays form the polar grid, with colour encoding magnitude. The transformation bends circles into new curves and redirects rays, visually demonstrating how distorts the polar structure of the plane.
Transformations Gallery
The images below show the before (domain) and after (image) states for various transformations applied to both Cartesian and Polar grids. Each pair demonstrates how a specific function reshapes the geometry of the complex plane.
Cartesian Dots — Power Mapping
Applying a power function such as to scattered Cartesian dots. The squaring map doubles angles and squares magnitudes, causing the dot cloud to wrap around the origin. Points near the unit circle remain relatively stable while those far away are flung outward.
Cartesian Grid — Reciprocal Mapping
A Cartesian grid transformed by a reciprocal-type mapping such as . The inversion maps the interior of the unit circle to the exterior and vice versa. Horizontal and vertical grid lines are mapped to families of circles passing through the origin.
Cartesian Grid — Combination Function
A more exotic transformation such as applied to the Cartesian grid. The interplay between the singular term and the linear term creates intricate swirling patterns with a rich mix of expansion, contraction, and rotation in different regions of the plane.
Polar Dots — Domain
The initial distribution of dots in polar colouring, with colour proportional to . Inner dots appear in one hue while outer dots transition to another, creating a clear radial gradient.
Polar Dots — Image
After the transformation, the radial colour gradient is redistributed. Under an inversion like , formerly outer (far) dots now cluster near the origin and vice versa, visually inverting the colour pattern.
Polar Lines — Domain
The polar grid before transformation: concentric circles and equally spaced radial lines. The magnitude-based colouring shows a smooth gradient from the centre outward.
Polar Lines — Image
After the transformation, the circles and rays have been warped into new curve families. A power map like triples the angular spacing of rays and cubes the radial distances, creating a visually striking pattern.
Additional Examples
The following videos demonstrate additional transformations on Cartesian dot grids with varied functions, showcasing the range of geometric effects achievable with different complex mappings.
A fractional power map produces a complex multi-sheeted structure. The non-integer exponent creates overlapping folds as points wrap around the origin more than once.
A shifted reciprocal squared map. The pole at creates a singularity that pulls nearby points to infinity while distant points collapse toward the origin.
A scaled cubic map triples arguments and cubes magnitudes, amplified by a factor of 3. The three-fold symmetry is clearly visible as the dot cloud wraps around the origin three times.
Technology Stack
This project was built using Processing (Java-based creative coding framework), leveraging its real-time rendering pipeline for smooth animations of thousands of points. A custom Complex class implements arithmetic operations (addition, subtraction, multiplication, power, reciprocal, polar conversion) used to evaluate transformations at each point.