conformal_functions¶
shortfx.fxNumeric.conformal_functions
¶
Conformal mappings from complex analysis.
Classical conformal transformations and complex mappings from Murray R. Spiegel's Mathematical Handbook of Formulas and Tables: Möbius (bilinear), Joukowski, power, exponential, and special mappings.
Functions¶
cayley_transform(z: Tuple[float, float]) -> Tuple[float, float]
¶
Cayley transform w = (z - i) / (z + i).
Maps the upper half-plane to the unit disk, sending i → 0.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
Tuple[float, float]
|
Input complex number (re, im). |
required |
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
Result w as (re, im). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If z + i = 0 (i.e. z = -i). |
Example
cayley_transform((0, 1)) (0.0, 0.0)
Complexity: O(1)
Source code in shortfx/fxNumeric/conformal_functions.py
exponential_map(z: Tuple[float, float]) -> Tuple[float, float]
¶
Conformal exponential map w = e^z.
Maps horizontal strips to sectors/annuli.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
Tuple[float, float]
|
Input complex number (re, im). |
required |
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
Result w as (re, im). |
Example
re, im = exponential_map((0, 3.14159265)) (round(re, 4), round(im, 4)) (-1.0, 0.0)
Complexity: O(1)
Source code in shortfx/fxNumeric/conformal_functions.py
inverse_cayley_transform(w: Tuple[float, float]) -> Tuple[float, float]
¶
Inverse Cayley transform z = i(1 + w) / (1 - w).
Maps the unit disk back to the upper half-plane.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
w
|
Tuple[float, float]
|
Input complex number (re, im). |
required |
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
Result z as (re, im). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If w = 1. |
Example
z = inverse_cayley_transform((0, 0)) (round(z[0], 6), round(z[1], 6)) (0.0, 1.0)
Complexity: O(1)
Source code in shortfx/fxNumeric/conformal_functions.py
inverse_joukowski(w: Tuple[float, float]) -> Tuple[Tuple[float, float], Tuple[float, float]]
¶
Computes both preimages of the Joukowski map: z = (w ± sqrt(w² - 4)) / 2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
w
|
Tuple[float, float]
|
Image complex number (re, im). |
required |
Returns:
| Type | Description |
|---|---|
Tuple[Tuple[float, float], Tuple[float, float]]
|
Tuple of two complex numbers (z1, z2). |
Example
z1, z2 = inverse_joukowski((2.5, 0)) round(z1[0], 4) 2.0
Complexity: O(1)
Source code in shortfx/fxNumeric/conformal_functions.py
inversion_map(z: Tuple[float, float]) -> Tuple[float, float]
¶
Complex inversion w = 1/z.
Fundamental conformal mapping exchanging interior and exterior of unit circle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
Tuple[float, float]
|
Input complex number (re, im). Must not be (0, 0). |
required |
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
Result w as (re, im). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If z = 0. |
Example
inversion_map((0, 1)) (0.0, -1.0)
Complexity: O(1)
Source code in shortfx/fxNumeric/conformal_functions.py
joukowski_transform(z: Tuple[float, float]) -> Tuple[float, float]
¶
Applies the Joukowski (Zhukovsky) conformal transformation w = z + 1/z.
Maps circles to airfoil-like shapes. Fundamental in aerodynamics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
Tuple[float, float]
|
Input complex number (re, im). Must not be (0, 0). |
required |
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
Result w as (re, im). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If z = 0. |
Example
joukowski_transform((2, 0)) (2.5, 0.0)
Complexity: O(1)
Source code in shortfx/fxNumeric/conformal_functions.py
koebe_function(z: Tuple[float, float]) -> Tuple[float, float]
¶
Koebe function w = z / (1 - z)².
The extremal function in the theory of univalent functions (Bieberbach conjecture). Maps the unit disk to C \ (-∞, -1/4].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
Tuple[float, float]
|
Input complex number (re, im) with |z| < 1. |
required |
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
Result w as (re, im). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If 1 - z = 0. |
Example
re, im = koebe_function((0.5, 0)) round(re, 4) 2.0
Complexity: O(1)
Source code in shortfx/fxNumeric/conformal_functions.py
log_map(z: Tuple[float, float]) -> Tuple[float, float]
¶
Principal branch of the complex logarithm w = Log(z).
Maps the punctured plane to a horizontal strip of width 2π.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
Tuple[float, float]
|
Input complex number (re, im). Must not be (0, 0). |
required |
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
Result w as (re, im) where im is in (-π, π]. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If z = 0. |
Example
re, im = log_map((1, 0)) (round(re, 6), round(im, 6)) (0.0, 0.0)
Complexity: O(1)
Source code in shortfx/fxNumeric/conformal_functions.py
mobius_transform(z: Tuple[float, float], a: Tuple[float, float], b: Tuple[float, float], c: Tuple[float, float], d: Tuple[float, float]) -> Tuple[float, float]
¶
Applies a Möbius (bilinear) transformation w = (az + b) / (cz + d).
The transformation is conformal wherever cz + d ≠ 0.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
Tuple[float, float]
|
Input complex number (re, im). |
required |
a
|
Tuple[float, float]
|
Coefficient a (re, im). |
required |
b
|
Tuple[float, float]
|
Coefficient b (re, im). |
required |
c
|
Tuple[float, float]
|
Coefficient c (re, im). |
required |
d
|
Tuple[float, float]
|
Coefficient d (re, im). |
required |
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
Result w as (re, im). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If cz + d = 0. |
Example
mobius_transform((1, 0), (1, 0), (0, 0), (0, 0), (1, 0)) (1.0, 0.0)
Complexity: O(1)
Source code in shortfx/fxNumeric/conformal_functions.py
power_map(z: Tuple[float, float], n: float) -> Tuple[float, float]
¶
Conformal power map w = z^n.
Maps sectors to half-planes when n is chosen appropriately.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
Tuple[float, float]
|
Input complex number (re, im). |
required |
n
|
float
|
Exponent (real). |
required |
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
Result w as (re, im). |
Example
re, im = power_map((0, 1), 2) (round(re, 6), round(im, 6)) (-1.0, 0.0)
Complexity: O(1)
Source code in shortfx/fxNumeric/conformal_functions.py
schwarz_christoffel_half_plane_to_rectangle(z: Tuple[float, float], k: float) -> Tuple[float, float]
¶
Approximate Schwarz-Christoffel map from upper half-plane to a rectangle.
Uses the incomplete elliptic integral F(arcsin(z), k) for the mapping. This is a simplified version for real z on [0, 1].
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
Tuple[float, float]
|
Point in the z-plane (re, im). For basic use, im should be small. |
required |
k
|
float
|
Modulus of the elliptic function, 0 < k < 1. |
required |
Returns:
| Type | Description |
|---|---|
Tuple[float, float]
|
Approximate mapped point w as (re, im). |
Example
re, im = schwarz_christoffel_half_plane_to_rectangle((0.5, 0), 0.5) isinstance(re, float) True
Complexity: O(n) numerical quadrature.