Apply Mobius Transform on a PNG
Apply Möbius (fractional linear) transformations to PNG images. Configure complex parameters a, b, c, d for inversions, rotations, and conformal maps.
About
A Möbius transformation maps every pixel of an image through the complex function f(z) = (az + b) ÷ (cz + d), where a, b, c, d are complex coefficients and z = x + iy encodes pixel position. These transformations are conformal: they preserve angles locally but can radically distort scale and topology. Incorrect parameter choices produce singularities where cz + d = 0, sending regions to infinity and creating visual black holes in your output. This tool computes the inverse map for each output pixel via bilinear interpolation, avoiding the sampling artifacts that plague forward-mapping implementations.
The computation normalizes pixel coordinates to a −1 to +1 complex plane centered on the image. Parameters default to the identity transform (a = d = 1, b = c = 0). Adjusting c introduces inversion effects. Non-trivial b shifts the center of distortion. This tool approximates the continuous Möbius map on a discrete pixel grid. Accuracy degrades near poles where magnification exceeds the source resolution.
Formulas
The Möbius transformation on the complex plane is defined as:
where a, b, c, d ∈ C and ad − bc ≠ 0 (non-degenerate condition). To avoid forward-mapping holes, we use the inverse transform for each output pixel w:
Pixel coordinates (px, py) are normalized to the complex plane via:
where W = image width, H = image height. Bilinear interpolation samples the source at fractional coordinates. Pixels mapping outside the source bounds render as transparent (alpha = 0).
Complex multiplication: (ar + aii)(zr + zii) = (arzr − aizi) + (arzi + aizr)i. Complex division uses the conjugate of the denominator multiplied through.
Reference Data
| Preset Name | a (Re, Im) | b (Re, Im) | c (Re, Im) | d (Re, Im) | Effect |
|---|---|---|---|---|---|
| Identity | 1, 0 | 0, 0 | 0, 0 | 1, 0 | No change |
| Circle Inversion | 0, 0 | 1, 0 | 1, 0 | 0, 0 | Inversion in unit circle |
| Rotation 45° | 0.707, 0.707 | 0, 0 | 0, 0 | 1, 0 | Pure rotation |
| Rotation 90° | 0, 1 | 0, 0 | 0, 0 | 1, 0 | Quarter turn |
| Translation | 1, 0 | 0.3, 0.2 | 0, 0 | 1, 0 | Shift center |
| Dilation ×2 | 2, 0 | 0, 0 | 0, 0 | 1, 0 | Zoom in ×2 |
| Swirl | 1, 0.5 | 0, 0 | 0, 0.3 | 1, 0 | Spiral distortion |
| Fish-eye | 1, 0 | 0, 0 | 0.5, 0 | 1, 0 | Barrel distortion |
| Droste Mild | 1, 0 | −0.2, 0 | 0.8, 0 | 1, 0 | Recursive zoom feel |
| Kaleidoscope | 0.5, 0.5 | 0.3, −0.3 | −0.3, 0.3 | 0.5, 0.5 | Symmetric folding |
| Wormhole | 0, 1 | 1, 0 | 1, 0 | 0, −1 | Topological twist |
| Hyperbolic | 2, 0 | 0, 0 | 0, 0 | 0.5, 0 | Stretch along real axis |
| Conformal Flip | −1, 0 | 0, 0 | 0, 0 | 1, 0 | Mirror + negate |