I've been playing around with a visualization technique for complex functions where one views the function $f: \mathbb{C} \rightarrow \mathbb{C}$ as the vector field $f: \mathbb{R^2} \rightarrow \mathbb{R^2}$. These vector fields have some nice properties as a consequence of the Cauchy-Riemann equations, and usually look pretty neat. I'm surprised I haven't heard of this until recently (they're known as Pólya plots). Here's an example:
f[z_] := Exp[-z^2]
VectorPlot[{Re[f[x + I*y]], Im[f[x + I*y]]}, {x, -1.5, 1.5}, {y, -1, 1},
VectorPoints -> Fine]
The problem I'm having is trying to do this near the poles of functions. This is understandable, however Mathematica usually has no trouble plotting functions with singularities. Here's an attempt to plot $z^{-1}$:
I tried upping MaxRecursion
and a couple of other things, but I figured you guys might know what to do immediately.
Now that the pole issue has been taken care of (thanks to everyone who contributed), here are some very intriguing plots:
Poles of $\Gamma(z)$ at -4, -3, and -2:
PolyaPlot[g, {-4.5, -1.5}, {-1, 1}, 50]
$\sin(z)$:
PolyaPlot[F, {-3 Pi/2, 3 Pi/2}, {-4, 4}, 45]
Now, here is a function that has poles over a subset of the Gaussian integers. The plot immediately reveals the symmetry of the zeros of the nontrivial polynomial
$35900-(72768-72768 i) z-128304 i z^2+(64392+64392 i) z^3-40305 z^4+(8064-8064 i) z^5+2016 i z^6-(144+144 i) z^7+9 z^8$
$\displaystyle \sum_{m=1}^{3} \sum_{n=1}^{3} \frac{1}{z-(m+in)}$:
PolyaPlot[G, {.7,3.3},{.7,3.3},60]
where the function PolyaPlot
is given by:
PolyaPlot[f_,ReBounds_,ImBounds_,vPoints_]:=Module[{reMin=ReBounds[[1]],reMax=ReBounds[[2]],imMin=ImBounds[[1]],imMax=ImBounds[[2]]},
Return[VectorPlot[{Re[f[x+I*y]],Im[f[x+I*y]]},
{x,reMin,reMax},{y,imMin,imMax},
VectorPoints->vPoints,
VectorScale->{Automatic,Automatic,None},
VectorColorFunction -> (Hue[2 ArcTan[#5]/Pi]&),
VectorColorFunctionScaling->False]];
]
LineIntegralConvolutionPlot[{Re[f[x + I*y]], Im[f[x + I*y]]}, {x, -1.5, 1.5}, {y, -1, 1}, RasterSize -> 300, LineIntegralConvolutionScale -> 3, ColorFunction -> (ColorData["Rainbow"][2 ArcTan[#5]/\[Pi]] &), ColorFunctionScaling -> False]
$\endgroup$