8

We cannot plot graph of a complex function $f:\mathbb {C\to C}$ as it requires $4$ dimensions.But we can show how the mapping transforms the domain plane into image plane.We can draw grid lines parallel and perpendicular to $x$-axis and see how the grid lines are modified.But often it becomes tedious task to plot these kind of diagrams.Is there any systematic procedure to draw such figures without help of any software?

For example , $z^2,z^3,\sin(z),\log(z),\exp(z)$ etc.

I want a method to visualize any given function.Is there a way out?

enter image description here

enter image description here

  • Without help of any software? – lhf May 03 '21 at 14:28
  • @lhf yes,without software would be better,but I won't mind if you suggest me some software other than wolframalpha. – Kishalay Sarkar May 03 '21 at 14:30
  • Very hard to do by hand. See also https://math.stackexchange.com/a/40308/589 and https://math.stackexchange.com/questions/3236021/is-it-possible-to-graph-complex-zeros-of-a-polynomial – lhf May 03 '21 at 14:33
  • There's another site that does the job. Functions of $z$ could be entered. http://davidbau.com/conformal/#iz%5E2-1%2Bexp(z)%2F10 – autodavid May 23 '21 at 22:04
  • 1
    The grid lines keep one of the coordinates fixed, and the other coordinate acts as the parameter of a parametric equation, which you can eliminate. E.g.

    $$z\to z^2\leftrightarrow\begin{cases}x=u^2-V^2,\y=2uV\end{cases}\leftrightarrow x=\frac{y^2}{4V^2}-V^2,$$ a family of parabolas.

    –  Oct 26 '21 at 12:14

2 Answers2

7

Some years ago, I have written a simple script in Python that can do it ... May be it can help you ? This just needs a (free) python distribution :

import matplotlib.pyplot as plt
import numpy as np

def func(z): return z**2

def plot_conformal_map(f, xmin, xmax, ymin, ymax, nb_grid, nb_points): xv, yv = np.meshgrid(np.linspace(xmin, xmax, nb_grid), np.linspace(ymin, ymax, nb_points)) xv = np.transpose(xv) yv = np.transpose(yv)

zv = func(xv + 1j*yv)
uv = np.real(zv)
vv = np.imag(zv)



xh, yh = np.meshgrid(np.linspace(xmin, xmax, nb_points), np.linspace(ymin, ymax, nb_grid))

zh = func(xh + 1j*yh)
uh = np.real(zh)
vh = np.imag(zh)


ax = plt.subplot(121)
for i in range(len(yv)):
    ax.plot(xv[i], yv[i], 'b-', lw=1)
    ax.plot(xh[i], yh[i], 'r-', lw=1)

ax2 = plt.subplot(122)
for i in range(len(vv)):
    ax2.plot(uv[i], vv[i], 'b-', lw=1)
    ax2.plot(uh[i], vh[i], 'r-', lw=1)

plt.show()


nb_grid = 9 nb_points = 30

xmin, xmax, ymin, ymax = -1, 1, -1, 1

plot_conformal_map(func, xmin, xmax, ymin, ymax, nb_grid, nb_points)

And the output : https://i.sstatic.net/j0d1j.jpg

5

Another popular way for plotting complex functions is domain coloring, which associates brightness with the modules of $f(z)$ and hue with its argument.

I recently write cplot, a Python package which makes creating these plots easy. For example, for the natural log:

enter image description here

import cplot
import numpy as np

plt = cplot.plot(np.log, (-2.0, +2.0, 400), (-2.0, +2.0, 400)) plt.show()

cplot's gallery has many more cool examples.