--Copyright The Numerical Algorithms Group Limited 1994.
-- Color gallery page 7

)r conformal

-- Conformal maps

-- The map z +-> z + 1/z on the complex plane

-- The coordinate grid for the complex plane

f z == z

conformalDraw(f, -2..2, -2..2, 9, 9, "cartesian")

f z == z + 1/z

conformalDraw(f, -2..2, -2..2, 9, 9, "cartesian")

-- The map z +-> -(z+1)/(z-1)
-- This function maps the unit disk to the right half-plane, as shown
-- on the Riemann sphere.

-- The unit disk
f z == z
riemannConformalDraw(f, 0.1..0.99, 0..2*%pi, 7, 11, "polar")

-- The right half-plane
f z == -(z+1)/(z-1)
riemannConformalDraw(f, 0.1..0.99, 0..2*%pi, 7, 11, "polar")

-- Visualization of the mapping from the complex plane to the Riemann Sphere.
riemannSphereDraw(-4..4, -4..4, 7, 7, "cartesian")

