Complex Mapping and Vibration
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. Unit circle is shown in white color for reference.
Transformations Gallery
The images below compare the transformation results of different complex mappings in both dots and lines rendering styles. Showing the original domain states is omitted here as they are identical to the grids shown at the top of the page.
Cartesian Dots — Reciprocal Mapping
A scattered cloud of Cartesian dots transformed by the reciprocal mapping . The dots cluster near the origin as outer points are pulled inward, revealing the inverse mapping behavior.
Cartesian Lines — Reciprocal Mapping
A regular Cartesian grid transformed by the reciprocal mapping . Straight lines are warped into circles passing through the origin, illustrating how grid structures deform.
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.
Cartesian Lines — Combination Function
A more exotic transformation such as applied to the Cartesian grid. The interplay between singular and linear terms creates intricate swirling patterns.
Polar Dots — Reciprocal Power
The result of a polar dots reciprocal power mapping accodring to . Formerly outer (far) dots now cluster near the origin and vice versa, visually inverting the magnitude-based radial color gradient.
Polar Lines — Power Mapping
The result of a polar grid lines power mapping. The circles and radial rays are warped into new curve families, demonstrating how triples the angular spacing and cubes the distances.
Additional Examples
The following videos showcase various complex transformations animated in real time. Click on any video to open it in full resolution and view the dynamic mapping behavior.
Polar Dots — Inversion
This is one of the most beautiful transformations I have come acrosss. The dots rotate themselves around 3 specific points, probably related to the geometry of the complex plane, and how this function affects it.
Cartesian Dots — Reciprocal
Dots mapped by inversion, showing points flowing across the unit circle boundary.
Cartesian Lines — Reciprocal
Lines warping into nested, orthogonal circular arcs intersecting at the origin.
Polar Lines — Cubic
Grid mapping that wraps the plane three times, compressing the interior.
Cartesian Dots — Power
Fractional exponent creating overlapping sheets and spiral dislocation.
Cartesian Dots — Shifted Pole
Singularity at z = -1 pulling grid structure into a dramatic outward flow.
Cartesian Dots — Scaled Cubic
Cubic expansion mapping showing three-fold symmetric warp of the dot cloud.
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.