In this first cell I switch off Mathematica worning messages. Place the cursor in the cell below and press Shift+Enter. Answer YES to the question that follows.

Off[General::"spell1", General::"spell", 
      Graphics::"realu"]; Off[Arg::"indet"]; 
    Off[Power::"infy"];
Off[Infinity::"indet"];

Visualizing complex functions

Branko Curgus

Definitions of commands

In the next cell I define the colloring functions, saturation and brightness and the complex coloring graph function. It is a long cell. Many examples are below.

Clear[cc, br, sa, t];
cc = N[1];
sa[t_] :=  
      If[1/t == 0, 0, 
        If[t < cc, 1, N[((1 (1))/( 1 +  .35 Log[t/cc]))]]]; 
    br[t_] := If[t > cc, 1, 
        N[((E  t/cc )/Exp)[t/cc]]];
Clear[ComplexGraph, x, y, fn, xmin, xmax, XMM, ymin, ymax, YMM, 
        xpoints, ypoints, PTS, opts];

    
\(\(ComplexGraph[fn_, {x_Symbol, xmin_, xmax_}, {y_Symbol, ymin_, ymax_}, 
          PTS_: {100, 100}, 
          opts___Rule] := 
Module[{xpts, ypts, stx, sty, 
            pts}, 
xpts = PTS[[1]]; 
          ypts = PTS[[2]]; \ 
          stx = \(xmax - xmin\)\/xpts; \ sty = \(ymax - ymin\)\/ypts; 
          pts = \ N[
              Tuples[{Range[xmin, xmax, stx], 
                  Range[ymin, ymax, sty]}]]; 


          Show[
Graphics[{
\({\(Function[{x, y}, Hue[
Mod[
If[
                                  fn[\((x + I\ y)\)] == 0, 0, 
                                  Arg[fn[x + I*y]]], 
                                2  Pi]/\((2  Pi)\), 
sa[
                              Abs[fn[x + I*y]]], 
                            br[Abs[
                                fn[x + 
                                    I*y]]]
]
]\)[#[[1]], #[[2]]], 
Polygon[{{#[[1]], #[[2]]}, {#[[1]] + 
                              stx, #[[2]]}, {#[[1]] + 
                              stx, #[[2]] + sty}, {#[[1]], #[[2]] + 
                              sty}, {#[[1]], #[[2]]}}]} &\) /@ 
                  pts
}], 
AspectRatio -> Automatic, Frame -> True, Ticks -> Automatic, 
            Sequence[
              opts]
]
];\)\)

Examples

Many examples follow. Execute the commands below and see what you learn from the pictures. Try your own functions.

ComplexGraph[
        Function[z, z], {x, -15, 15}, {y, -15, 15}, {200, 200}, 
        ImageSize -> 300];

ComplexGraph[
        Function[z, z], {x, -2, 2}, {y, -2, 2}, {200, 200}, 
        ImageSize -> 300];

ComplexGraph[
        Function[z, Re[z]], {x, -15, 15}, {y, -15, 15}, {150, 150}, 
        ImageSize -> 300];

ComplexGraph[
        Function[z, Re[z]], {x, -2, 2}, {y, -2, 2}, {150, 150}, 
        ImageSize -> 300];

ComplexGraph[
        Function[z, I Im[z]], {x, -15, 15}, {y, -15, 15}, {150, 
          150}, ImageSize -> 300];

ComplexGraph[
        Function[z, I Im[z]], {x, -2, 2}, {y, -2, 2}, {150, 150}, 
        ImageSize -> 300];

ComplexGraph[
        Function[z, Arg[z]], {x, -5, 5}, {y, -5, 5}, {150, 150}, 
        ImageSize -> 300];

ComplexGraph[
        Function[z, Abs[z]], {x, -15, 15}, {y, -15, 15}, {150, 150}, 
        ImageSize -> 300];
ComplexGraph[
        Function[z, Abs[z]], {x, -2, 2}, {y, -2, 2}, {150, 150}, 
        ImageSize -> 300];

ComplexGraph[
        Function[z, z^2], {x, -15, 15}, {y, -15, 15}, {150, 150}, 
        ImageSize -> 300];
ComplexGraph[
      Function[z, z^2], {x, -2, 2}, {y, -2, 2}, {150, 150}, 
      ImageSize -> 300]

ComplexGraph[
        Function[z, z^3], {x, -15, 15}, {y, -15, 15}, {150, 150}, 
        ImageSize -> 300];
ComplexGraph[
      Function[z, z^3], {x, -2, 2}, {y, -2, 2}, {150, 150}, 
      ImageSize -> 300]

ComplexGraph[
        Function[z, z^3 - 1], {x, -15, 15}, {y, -15, 15}, {150, 150}, 
        ImageSize -> 300];
ComplexGraph[
        Function[z, z^3 - 1], {x, -2, 2}, {y, -2, 2}, {150, 150}, 
        ImageSize -> 300];

ComplexGraph[
        Function[z, Sin[z] Sin[I z]], {x, -10, 10}, {y, -10, 
          10}, {200, 200}, ImageSize -> 300];

ComplexGraph[
        Function[z, 1/z], {x, -1, 1}, {y, -1, 1}, {100, 100}, 
        ImageSize -> 300];

Try also magnifying the image above.

ComplexGraph[
        Function[z, (1/((z^3) - 1))], {x, -2, 2}, {y, -2, 2}, {150, 
          150}, ImageSize -> 300];

ComplexGraph[
        Function[z, Exp[Re[z]]], {x, -3, 10}, {y, -5, 5}, {100, 150}, 
        ImageSize -> 300, 
        FrameTicks ->  {Range[-15, 20], 
            Range[-10 , 10, 1], {}, {}}];

ComplexGraph[
        Function[z, Exp[z]], {x, -3, 7}, {y, -Pi, 4 Pi}, {200, 300}, 
        ImageSize -> 300, 
        FrameTicks ->  {Range[-15, 20], 
            Range[-10 Pi, 10  Pi, Pi], {}, {}}];

ComplexGraph[
        Function[z, Log[z]], {x, -5, 5}, {y, -5, 5}, {300, 300}, 
        ImageSize -> 400, 
        FrameTicks ->  {Range[-15, 20], 
            Range[-10, 10], {}, {}}];

ComplexGraph[
        Function[z, Cos[z]], {x, -7, 7}, {y, -7, 7}, {150, 150}, 
        ImageSize -> 300, 
        FrameTicks ->  {Range[-10 Pi, 20 Pi, (Pi/2)], 
            Range[-10, 10, 1], {}, {}}];

ComplexGraph[
        Function[z, Cosh[z]], {x, -7, 7}, {y, -7, 7}, {150, 150}, 
        ImageSize -> 300, 
        FrameTicks ->  {Range[-10, 10, 1], 
            Range[-10 Pi, 20 Pi, (Pi/2)], {}, {}}];

ComplexGraph[
        Function[z, Zeta[z]], {x, -30, 10}, {y, -30, 30}, {240, 320}, 
        ImageSize -> 300];

ComplexGraph[
        Function[z, Zeta[z]], {x, -1, 2}, {y, 13, 19}, {100, 200}, 
        ImageSize -> 200];

ComplexGraph[
        Function[z, Sin[(z^3) - 1]/z], {x, -3, 3}, {y, -3, 3}, {200, 
          200}, ImageSize -> 300];

ComplexGraph[
        Function[z, (1/((((z^5) - 1))^2))], {x, -1.5, 1.5}, {y, -1.5, 
          1.5}, {200, 200}, ImageSize -> 300];

ComplexGraph[
        Function[z, 
          1 + z + (1/(2!)) (z^2) + (1/(3!)) (z^3) + (1/(4!)) 
              (z^4)], {x, -10, 10}, {y, -10, 10}, {150, 150}, 
        ImageSize -> 300];

Other ways to visualize

In the next few cells I explore different options for presenting complex graphs.

Arg

This is a graph of the principal argument function. Since its values are real numbers this graph lives in a three dimensional space, so it can be well represented.

Plot3D[Arg[x + I y], {x, -2, 2}, {y, -2, 2}, 
      Mesh -> False]

This is a graph of the multivalued argument function. Again the values are real numbers this graph lives in a three dimensional space, so it can be well represented. In the graph below the principal argument is presented by hue.

ParametricPlot3D[{r Cos[th], r Sin[th], 
        th/3, {EdgeForm[], 
          FaceForm[Hue[Mod[th, 2 Pi]/(2 Pi)]]}}, {th, -Pi, 
        5 Pi}, {r, 0, 2}, BoxRatios -> {1, 1, 1}, 
      PlotPoints -> {220, 50}, Lighting -> False]

Different branches of the argument function are presented in the animation below:

Table[
        ParametricPlot3D[{r Cos[th], r Sin[th], 
            th/3, {EdgeForm[], 
              FaceForm[Hue[Mod[th, 2 Pi]/(2 Pi)]]}}, {th, a, 
            a  + 2 Pi}, {r, 0, 2}, BoxRatios -> {1, 1, 1}, 
          PlotPoints -> {220, 50}, Lighting -> False, 
          PlotRange -> {-Pi/3, 5 Pi/3}], {a, -Pi, 3 Pi, 
          (Pi/12)}];

Powers

The square function

The next graph is the square function. The vertical axes represents the modulus while the hue represents the argument.

Plot3D[{Abs[(x + I y)^2], 
        Hue[Mod[Arg[(x + I y)^2], 2 Pi]/(2 Pi)]}, {x, -2, 
        2}, {y, -2, 2}, Mesh -> False, PlotPoints ->  100, 
      BoxRatios -> {1, 1, 1.5}, ImageSize -> 250]

In the next graph of the square function the vertical axes represents the real part,  while the imaginary part is represented as in the colored complex plane.

Plot3D[{Re[(x + I y)^2], 
          Hue[0.25 +  .5 (1.  - UnitStep[Im[(x + I y)^2]]), 
            sa[Abs[Im[(x + I y)^2]]]^2, 
            br[Abs[Im[(x + I y)^2]]]^1]}, {x, -2, 2}, {y, -2, 
          2},  PlotPoints -> {100, 100}, Mesh -> False, 
        ClipFill -> None, BoxRatios -> {1, 1, 1.5}];

ParametricPlot3D[{x, y, 
        x^2 - y^2, {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - UnitStep[2 x y]), 
              sa[Abs[2 x y]]^1.5, br[Abs[2 x y]]^1]]}}, {x, -2, 
        2}, {y, -2, 2},  PlotRange -> {-4, 4},  
      PlotPoints -> {150, 150}, BoxRatios -> {1, 1, 1.5}, 
      Ticks -> {Automatic, Automatic, Automatic}, 
      Lighting ->  False]

The cube function

The next graph is the square function. The vertical axes represents the modulus while the hue represents the argument.

Plot3D[{Abs[(x + I y)^3], 
        Hue[Mod[Arg[(x + I y)^3], 2 Pi]/(2 Pi)]}, {x, -2, 
        2}, {y, -2, 2}, Mesh -> False, PlotPoints ->  100, 
      BoxRatios -> {1, 1, 1.5}, ImageSize -> 250]

In the next graph of the cube function the vertical axes represents the real part,  while the imaginary part is represented as in the colored complex plane.

Plot3D[{Re[(x + I y)^3], 
          Hue[0.25 +  .5 (1.  - UnitStep[Im[(x + I y)^3]]), 
            sa[Abs[Im[(x + I y)^3]]]^2, 
            br[Abs[Im[(x + I y)^3]]]^1]}, {x, -2, 2}, {y, -2, 
          2},  PlotPoints -> {100, 100}, Mesh -> False, 
        ClipFill -> None, BoxRatios -> {1, 1, 1.5}];

Roots

The square root

The next graph is the principal square root function. The vertical axes represents the modulus while the hue represents the argument.

Plot3D[{Abs[Sqrt[x + I y]], 
          Hue[Mod[Arg[Sqrt[x + I y]], 2 Pi]/(2 Pi)]}, {x, -4, 
          4}, {y, -4, 4}, Mesh -> False, 
        PlotPoints ->  100];

In the next graph of the principal square root function the vertical axes represents the real part,  while the imaginary part is represented as in the colored complex plane.

Plot3D[{Re[Sqrt[x + I y]], 
        Hue[0.25 +  .5 (1.  - UnitStep[Im[Sqrt[x + I y]]]), 
          sa[Abs[Im[Sqrt[x + I y]]]]^2, 
          br[Abs[Im[Sqrt[x + I y]]]]^1]}, {y, -16, 16}, {x, -4, 
        4},  PlotRange -> {- .1, 3.5},  
      PlotPoints -> {100, 100}, Mesh -> False, 
      ClipFill -> None, BoxRatios -> {2, 2, 1}, 
      ImageSize -> 300]

In the next graph we use the same vertical axes and the coloring scheme to represent the complex multivalued square function.

ParametricPlot3D[{r Cos[th], r Sin[th], 
          Re[(Sqrt[r]) Exp[I th/2]], {EdgeForm[], 
            FaceForm[
              Hue[0.25 +  .5 (1.  - UnitStep[Im[(Sqrt[r]) Exp[I th/2]]]), 
                sa[Abs[Im[(Sqrt[r]) Exp[I th/2]]]]^2, 
                br[Abs[Im[(Sqrt[r]) Exp[I th/2]]]]^1]]}}, {th, 0, 4 Pi}, {r, 
          0, 16}, BoxRatios -> {1, 1, 1}, PlotPoints -> {100, 50}, 
        Lighting -> False];

Here is one branch of the complex multivalued square function. By changing the value of a you can get other branches. The value a = -π will give you a part of the principal square root.

a = Pi; 
    ParametricPlot3D[{r Cos[th], r Sin[th], 
        Re[(Sqrt[r]) Exp[I th/2]], {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - UnitStep[Im[(Sqrt[r]) Exp[I th/2]]]), 
              sa[Abs[Im[(Sqrt[r]) Exp[I th/2]]]]^2, 
              br[Abs[Im[(Sqrt[r]) Exp[I th/2]]]]^1]]}}, {th, a, 
        a + 2  Pi}, {r, 0, 16}, BoxRatios -> {1, 1, 1}, 
      PlotRange -> {-4, 4}, PlotPoints -> {100, 50}, 
      Lighting -> False, 
      ViewPoint -> {2.218,  1.292,  1.866}];

Here is a movie showing different branches of the complex multivalued square function. Notice that each branch is one-to-one mapping between its domain and its range (although for sam branches one has to take into account the color of the points in the range).

Clear[a]; 
    Table[ParametricPlot3D[{r Cos[th], r Sin[th], 
          Re[(Sqrt[r]) Exp[I th/2]], {EdgeForm[], 
            FaceForm[
              Hue[0.25 +  .5 (1.  - UnitStep[Im[(Sqrt[r]) Exp[I th/2]]]), 
                sa[Abs[Im[(Sqrt[r]) Exp[I th/2]]]]^2, 
                br[Abs[Im[(Sqrt[r]) Exp[I th/2]]]]^1]]}}, {th, a, 
          a + 2  Pi}, {r, 0, 16}, BoxRatios -> {1, 1, 1}, 
        PlotRange -> {-4, 4}, PlotPoints -> {100, 50}, 
        Lighting -> False, 
        ViewPoint -> {2.218,  1.292,  1.866}], {a, -2 Pi,  0, 
        (Pi/12)}];

This is a different parametrization of the multivalued complex square root function. I just changed the roles of the z-plane and the w-plane.

ParametricPlot3D[{x^2 - y^2, 2 x y,  
        x, {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - UnitStep[y]), sa[Abs[y]]^2, 
              br[Abs[y]]^1]]}}, {x, -8, 8}, {y, -8, 8},  
      PlotRange -> {{-4, 4}, {-4, 4}, {-2, 2}},  
      PlotPoints -> {250, 250}, BoxRatios -> {1, 1, 1}, 
      Ticks -> {Automatic, Automatic, Automatic}, 
      Lighting ->  False]

The cube root

ParametricPlot3D[{r Cos[th], r Sin[th], 
        Re[(r^(1/3)) Exp[I th/3]], {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - UnitStep[Im[(Sqrt[r]) Exp[I th/3]]]), 
              sa[Abs[Im[(Sqrt[r]) Exp[I th/3]]]]^2, 
              br[Abs[Im[(Sqrt[r]) Exp[I th/3]]]]^1]]}}, {th, -2 Pi, 
        4  Pi}, {r, 0, 8}, BoxRatios -> {1, 1, 1}, 
      PlotPoints -> {100, 50}, Lighting -> False]

a = 0; 
    ParametricPlot3D[{
r Cos[th], r Sin[th], 
        Re[(r^(1/3)) Exp[I th/3]], {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - UnitStep[Im[(Sqrt[r]) Exp[I th/3]]]), 
              sa[Abs[Im[(Sqrt[r]) Exp[I th/3]]]]^2, 
              br[Abs[Im[(Sqrt[r]) Exp[I th/3]]]]^1]]}
}, 
{th, a, a + 2  Pi}, {r, 0, 8}, 
      BoxRatios -> {1, 1, 1}, PlotRange -> {-2, 2}, 
      PlotPoints -> {100, 50}, Lighting -> False]

Clear[a]; 
    Table[ParametricPlot3D[{r Cos[th], r Sin[th], 
          Re[(r^(1/3)) Exp[I th/3]], {EdgeForm[], 
            FaceForm[
              Hue[0.25 +  .5 (1.  - UnitStep[Im[(Sqrt[r]) Exp[I th/3]]]), 
                sa[Abs[Im[(Sqrt[r]) Exp[I th/3]]]]^2, 
                br[Abs[Im[(Sqrt[r]) Exp[I th/3]]]]^1]]}}, {th, a, 
          a + 2  Pi}, {r, 0, 8}, BoxRatios -> {1, 1, 1}, 
        PlotRange -> {-2, 2}, PlotPoints -> {100, 50}, 
        Lighting -> False], {a, -2 Pi, 2 Pi, (Pi/12)}];

ParametricPlot3D[{r Cos[th], r Sin[th], 
        Re[(r^(1/3)) Exp[I th/4]], {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - UnitStep[Im[(Sqrt[r]) Exp[I th/4]]]), 
              sa[Abs[Im[(Sqrt[r]) Exp[I th/4]]]]^2, 
              br[Abs[Im[(Sqrt[r]) Exp[I th/4]]]]^1]]}}, {th, 0, 8  Pi}, {r, 
        0, 16}, BoxRatios -> {1, 1, 1}, 
      PlotRange -> {-2.5, 
          2.5}, 
PlotPoints -> {100, 50}, 
      Lighting -> False]

Clear[a];
Table[
        ParametricPlot3D[{r Cos[th], r Sin[th], 
            Re[(r^(1/3)) Exp[I th/4]], {EdgeForm[], 
              FaceForm[
                Hue[0.25 +  .5 (1.  - 
                          UnitStep[Im[(Sqrt[r]) Exp[I th/4]]]), 
                  sa[Abs[Im[(Sqrt[r]) Exp[I th/4]]]]^2, 
                  br[Abs[Im[(Sqrt[r]) Exp[I th/4]]]]^1]]}}, {th, a, 
            a + 2  Pi}, {r, 0, 16}, BoxRatios -> {1, 1, 1}, 
          PlotRange -> {-2.5, 
              2.5}, 
PlotPoints -> {100, 50}, 
          Lighting -> False], {a, 0, 6 Pi, (Pi/12)}];

This is a different parametrization of the multivalued complex cube root function. I just changed the roles of the z-plane and the w-plane.

ComplexExpand[(((x + I y))^3)]

ParametricPlot3D[{(x^3) - 3 x (y^2), 3 (x^2) y - (y^3),  
        x, {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - UnitStep[y]), sa[Abs[y]]^2.2, 
              br[Abs[y]]^1]]}}, {x, -12, 12}, {y, -12, 12},  
      PlotRange -> {{-8, 8}, {-8, 8}, {-2.4, 2.4}},  
      PlotPoints -> {350, 350}, BoxRatios -> {1.5, 1.5, 1}, 
      Ticks -> {Automatic, Automatic, Automatic}, 
      Lighting ->  False]

An iressitible connection

k = 12; 
    ParametricPlot3D[{r Cos[th], 
        r Sin[th], (16/(16^(k/12))) 
          Re[(r^(k/12)) Exp[I k (th/12)]], {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - 
                      UnitStep[Im[(r^(k/12)) Exp[I k (th/12)]]]), 
              sa[Abs[Im[(r^(k/12)) Exp[I k (th/12)]]]]^2, 
              br[Abs[Im[ (r^(k/12)) Exp[I k (th/12)]]]]^1]]}}, {th, 
        0, ((12/k)) 2 Pi}, {r, 0, 16}, BoxRatios -> {1, 1, 1}, 
      PlotRange -> {-16, 16}, PlotPoints -> {150, 50}, 
      Lighting -> False];

k = 6; 
    ParametricPlot3D[{r Cos[th], 
        r Sin[th], (16/(16^(k/12))) 
          Re[(r^(k/12)) Exp[I k (th/12)]], {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - 
                      UnitStep[Im[(r^(k/12)) Exp[I k (th/12)]]]), 
              sa[Abs[Im[(r^(k/12)) Exp[I k (th/12)]]]]^2, 
              br[Abs[Im[ (r^(k/12)) Exp[I k (th/12)]]]]^1]]}}, {th, 
        0, ((12/k)) 2 Pi}, {r, 0, 16}, BoxRatios -> {1, 1, 1}, 
      PlotRange -> {-16, 16}, PlotPoints -> {150, 50}, 
      Lighting -> False];

Clear[k]; k = 6; 
    ParametricPlot3D[{r Cos[th], 
        r Sin[th], (16/(16^(k/12))) 
          Re[(r^(k/12)) Exp[I k (th/12)]], {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - 
                      UnitStep[Im[(r^(k/12)) Exp[I k (th/12)]]]), 
              sa[Abs[ Im[(r^(k/12)) Exp[I k (th/12)]]]]^1.5, 
              br[Abs[ Im[ (r^(k/12)) Exp[I k (th/12)]]]]^1]]}}, {th, 
        0, ((12/k)) 2 Pi}, {r, 0, 16}, BoxRatios -> {1, 1, 1}, 
      PlotRange -> {-16, 16}, 
      Ticks -> {Automatic, Automatic, {}}, PlotPoints -> {200, 60}, 
      Lighting -> False, ImageSize -> 300];

Clear[k];  
    Table[ParametricPlot3D[{r Cos[th], 
          r Sin[th], (16/(16^(k/12))) 
            Re[(r^(k/12)) Exp[I k (th/12)]], {EdgeForm[], 
            FaceForm[
              Hue[0.25 +  .5 (1.  - 
                        UnitStep[Im[(r^(k/12)) Exp[I k (th/12)]]]), 
                sa[Abs[ Im[(r^(k/12)) Exp[I k (th/12)]]]]^1.5, 
                br[Abs[ Im[ (r^(k/12)) Exp[I k (th/12)]]]]^1]]}}, {th, 
          0, ((12/k)) 2 Pi}, {r, 0, 16}, BoxRatios -> {1, 1, 1}, 
        PlotRange -> {-16, 16}, 
        Ticks -> {Automatic, Automatic, {}}, 
        PlotPoints -> {150, 60}, Lighting -> False, 
        ImageSize -> 300], {k, 12, 6, -1/6}];

Exp

The next graph is the complex exponential function. The vertical axes represents the modulus while the hue represents the argument.

Plot3D[{Abs[Exp[x + I y]], 
        Hue[Mod[Arg[Exp[x + I y]], 2 Pi]/(2 Pi)]}, {x, -2, 
        2}, {y, -Pi, 3  Pi},  PlotPoints -> {100, 100}, 
      Mesh -> False]

In the next graph of the complex exponential function the vertical axes represents the real part,  while the imaginary part is represented as in the colored complex plane.

Plot3D[{Re[Exp[x + I y]], 
          Hue[0.25 +  .5 (1.  - UnitStep[Im[Exp[x + I y]]]), 
            sa[Abs[Im[Exp[x + I y]]]]^1.5, 
            br[Abs[Im[Exp[x + I y]]]]^1]}, {x, -3, 4}, {y, -Pi, 
          4  Pi},  PlotRange -> {-10, 10},  
        PlotPoints -> {200, 200}, Mesh -> False, 
        ClipFill -> None, 
        Ticks -> {Automatic, Range[-2 Pi, 6 Pi, (Pi/2)], 
            Automatic}, BoxRatios -> {1, 1.5, 1.3}, 
        ImageSize -> 350];

Plot3D[{Re[Exp[x + I y]], 
          Hue[0.25 +  .5 (1.  - UnitStep[Im[Exp[x + I y]]]), 
            sa[Abs[Im[Exp[x + I y]]]]^1.5, 
            br[Abs[Im[Exp[x + I y]]]]^1]}, {x, -3, 4}, {y, -Pi, 
          4  Pi},  PlotRange -> {-10, 10},  
        PlotPoints -> {200, 200}, Mesh -> False, 
        ClipFill -> None, 
        Ticks -> {Automatic, Range[-2 Pi, 6 Pi, (Pi/2)], 
            Automatic}, BoxRatios -> {1, 1.5, 1.3}, 
        ImageSize -> 300, 
        ViewPoint -> {-1.314,  2.453,  1.702}];

Plot3D[{Re[Exp[x + I y]], 
          Hue[0.25 +  .5 (1.  - UnitStep[Im[Exp[x + I y]]]), 
            sa[Abs[Im[Exp[x + I y]]]]^1.5, 
            br[Abs[Im[Exp[x + I y]]]]^1]}, {x, -3, 4}, {y, -Pi, 
          4  Pi},  PlotRange -> {-10, 10},  
        PlotPoints -> {200, 200}, Mesh -> False, 
        ClipFill -> None, 
        Ticks -> {Automatic, Range[-2 Pi, 6 Pi, (Pi/2)], 
            Automatic}, BoxRatios -> {1, 1.5, 1.3}, 
        ImageSize -> 300, 
        ViewPoint -> {1.314,  -2.453,  1.702}];

Plot3D[{Im[Exp[x + I y]], 
          Hue[0.  +  .5 (1.  - UnitStep[Re[Exp[x + I y]]]), 
            sa[Abs[Re[Exp[x + I y]]]]^1.5, 
            br[Abs[Re[Exp[x + I y]]]]^1]}, {x, -3, 4}, {y, -Pi, 
          4  Pi},  PlotRange -> {-10, 10},  
        PlotPoints -> {200, 200}, Mesh -> False, 
        ClipFill -> None, 
        Ticks -> {Automatic, Range[-2 Pi, 6 Pi, (Pi/2)], 
            Automatic}, BoxRatios -> {1, 1.5, 1.3}, 
        ImageSize -> 350];

Now the same plot using parametric equations.

ParametricPlot3D[{x, 
        y, (E^x) Cos[y], {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - UnitStep[(E^x) Sin[y]]), 
              sa[Abs[(E^x) Sin[y]]]^1.5, 
              br[Abs[(E^x) Sin[y]]]^1]]}}, {x, -8, 
        8}, {y, -8, 13},  
      PlotRange -> {{-2, 4}, {-Pi, 4 Pi}, {-10, 10}},  
      PlotPoints -> {250, 250}, 
      Ticks -> {Automatic, Range[-2 Pi, 6 Pi, (Pi/2)], Automatic}, 
      BoxRatios -> {1, 1.5, 1.3}, ImageSize -> 300, 
      ViewPoint -> {-1.314,  2.453,  1.702}, 
      Lighting ->  False]

Now I change the roles of the z-plane and the w-plane. That is the w-plane is the horizontal plane in the picture below. The real axes in  the z-plane is the vertical axes below and the imaginary axes in the z-plane is represented by color.

ParametricPlot3D[{(E^x) Cos[y], (E^x) Sin[
            y], x, {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - UnitStep[y]), sa[Abs[y]]^1.5, 
              br[Abs[y]]^1]]}}, {x, -8, 8}, {y, -3, 8},  
      PlotRange -> {{-4, 4}, {-4, 4}, {-1, 2}},  
      PlotPoints -> {100, 100}, 
      Ticks -> {Automatic, Automatic, Automatic}, 
      BoxRatios -> {1.3, 1.3, 1}, ImageSize -> 300, 
      ViewPoint -> {-1.314,  2.453,  1.702}, 
      Lighting ->  False]

There is a problem with the above picture. Each point on the surface is colored over and over many times with the same color. This is a multivalued function but we do not see it. I illustrate this by showing several graphs with different range of y.

Clear[b]; 
    Table[ParametricPlot3D[{(E^x) Cos[
              y], (E^x) Sin[y], 
          x, {EdgeForm[], 
            FaceForm[
              Hue[0.25 +  .5 (1.  - UnitStep[y]), sa[Abs[y]]^1.5, 
                br[Abs[y]]^1]]}}, {x, -8, 8}, {y, b, b + 2  Pi},  
        PlotRange -> {{-4, 4}, {-4, 4}, {-1, 2}},  
        PlotPoints -> {100, 100}, 
        Ticks -> {Automatic, Automatic, Automatic}, 
        BoxRatios -> {1.3, 1.3, 1}, ImageSize -> 300, 
        ViewPoint -> {-1.314,  2.453,  1.702}, 
        Lighting ->  False], {b, -3 Pi, Pi, (Pi/12)}];

We will gain an additional understanding of this multivalued function if we change the representation of the real axes and the imaginary axes in the z-plane. In the next picture the imaginary axes in the z-plane is the vertical axes and the real axes in the z-plane is represented by color.

ParametricPlot3D[{(E^x) Cos[y], (E^x) Sin[
            y], y, {EdgeForm[], 
          FaceForm[
            Hue[0 +  .5 (1.  - UnitStep[x]), sa[Abs[x]]^1.5, 
              br[Abs[x]]^1]]}}, {x, -10, 8}, {y, -8, 13},  
      PlotRange -> {{-4, 4}, {-4, 4}, {-Pi, 4 Pi}},  
      PlotPoints -> {300, 300}, 
      Ticks -> {Automatic, Automatic, 
          Range[-2 Pi , 8 Pi, (Pi/2)]}, BoxRatios -> {1, 1 , 1}, 
      ImageSize -> 400, ViewPoint -> {-1.314,  2.453,  1.702}, 
      Lighting ->  False]

This is the principal velue of the logarithm

ParametricPlot3D[{(E^x) Cos[y], (E^x) Sin[
            y], y, {EdgeForm[], 
          FaceForm[
            Hue[0 +  .5 (1.  - UnitStep[x]), sa[Abs[x]]^1.5, 
              br[Abs[x]]^1]]}}, {x, -10, 8}, {y, -Pi, Pi},  
      PlotRange -> {{-4, 4}, {-4, 4}, {-Pi, 4 Pi}},  
      PlotPoints -> {300, 300}, 
      Ticks -> {Automatic, Automatic, 
          Range[-2 Pi , 8 Pi, (Pi/2)]}, BoxRatios -> {1, 1 , 1}, 
      ImageSize -> 400, ViewPoint -> {-1.314,  2.453,  1.702}, 
      Lighting ->  False]

Now the above animation takes a different flawor:

Clear[b]; 
    Table[ParametricPlot3D[{(E^x) Cos[
              y], (E^x) Sin[y], 
          y, {EdgeForm[], 
            FaceForm[
              Hue[0 +  .5 (1.  - UnitStep[x]), sa[Abs[x]]^2.7, 
                br[Abs[x]]^1]]}}, {x, -10, 8}, {y, b, b + 2 Pi},  
        PlotRange -> {{-4, 4}, {-4, 4}, {-Pi, 4 Pi}},  
        PlotPoints -> {200, 200}, 
        Ticks -> {Automatic, Automatic, 
            Range[-2 Pi , 8 Pi, (Pi/2)]}, 
        BoxRatios -> {1, 1 , 1}, ImageSize -> 300, 
        ViewPoint -> {-1.314,  2.453,  1.702}, 
        Lighting ->  False], {b, -Pi, 4  Pi, (Pi/6)}];

Complex powers

ComplexGraph[
        Function[z, Exp[I Log[z]]], {x, -125, 125}, {y, -125, 
          125}, {200, 200}, ImageSize -> 400];

Table[
        ComplexGraph[
          Function[z, Exp[Exp[I t] Log[z]]], {x, -5, 5}, {y, -5, 
            5}, {200, 200}, ImageSize -> 300], {t, 0, 2 Pi, 
          (Pi/24)}];

ParametricPlot3D[{x, y, 
        Re[Exp[I Log[x + I y]]], {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - UnitStep[Im[Exp[I Log[x + I y]]]]), 
              sa[Abs[Im[Exp[I Log[x + I y]]]]]^1.5, 
              br[Abs[Im[Exp[I Log[x + I y]]]]]^1]]}}, {x, -8, 
        8}, {y, -8, 8},  
      PlotRange -> {{-5, 5}, {-5, 5}, {-15, 15}},  
      PlotPoints -> {250, 250}, 
      Ticks -> {Automatic, Automatic, Automatic}, 
      BoxRatios -> {1, 1, 1}, ImageSize -> 300, 
      ViewPoint -> {-1.314,  2.453,  1.702}, 
      Lighting ->  False]

ParametricPlot3D[{r Cos[t], r Sin[t], 
        Re[Exp[I Log[r Cos[t] + I r Sin[t]]]], {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - 
                      UnitStep[Im[Exp[I Log[r Cos[t] + I r Sin[t]]]]]), 
              sa[Abs[Im[Exp[I Log[r Cos[t] + I r Sin[t]]]]]]^1.5, 
              br[Abs[Im[Exp[I Log[r Cos[t] + I r Sin[t]]]]]]^1]]}}, {r, 
        0.1, 5}, {t, -Pi +  .2, Pi -  .2},  
      PlotRange -> {{-5, 5}, {-5, 5}, {-1, 25}},  
      PlotPoints -> {150, 150}, 
      Ticks -> {Automatic, Automatic, Automatic}, 
      BoxRatios -> {1, 1, 1}, ImageSize -> 300, 
      ViewPoint -> {-1.314,  2.453,  1.702}, 
      Lighting ->  False]

ParametricPlot3D[{r Cos[t], r Sin[t], 
        Abs[Exp[I Log[r Cos[t] + I r Sin[t]]]], {EdgeForm[], 
          FaceForm[
            Hue[Mod[Arg[Exp[I Log[r Cos[t] + I r Sin[t]]]], 
                  2 Pi]/(2 Pi)]]}}, {r, 0.1, 5}, {t, -Pi +  .1, 
        Pi -  .1},  
      PlotRange -> {{-5, 5}, {-5, 5}, {-1, 25}},  
      PlotPoints -> {150, 150}, 
      Ticks -> {Automatic, Automatic, Automatic}, 
      BoxRatios -> {1, 1, 1}, ImageSize -> 300, 
      ViewPoint -> {-1.314,  2.453,  1.702}, 
      Lighting ->  False]

Sin

ComplexGraph[
        Function[z, Sin[z]], {x, -Pi, 4  Pi}, {y, -5, 5}, {200, 200}, 
        FrameTicks -> {Range[-2 Pi, 6 Pi, (Pi/2)], Automatic, None, 
            None}, ImageSize -> 400];

The next graph is the complex sine function. The vertical axes represents the modulus while the hue represents the argument.

Plot3D[{Abs[Sin[x + I y]], 
        Hue[Mod[Arg[Sin[x + I y]], 2 Pi]/(2 Pi)]}, {y, -2, 
        2}, {x, -Pi, 3  Pi},  PlotPoints -> {100, 100}, 
      Mesh -> False]

In the next graph of the complex sine function the vertical axes represents the real part,  while the imaginary part is represented as in the colored complex plane.

Plot3D[{Re[Sin[x + I y]], 
        Hue[0.25 +  .5 (1.  - UnitStep[Im[Sin[x + I y]]]), 
          sa[Abs[Im[Sin[x + I y]]]]^1.25, 
          br[Abs[Im[Sin[x + I y]]]]^1]}, {y, -5, 5}, {x, -Pi, 
        4  Pi},  PlotRange -> {-10, 10},  
      PlotPoints -> {200, 200}, Mesh -> False, 
      ClipFill -> None, 
      Ticks -> {Automatic, Range[-2 Pi, 6 Pi, (Pi/2)], Automatic}, 
      BoxRatios -> {1, 1.5, 1}]

ParametricPlot3D[{x, y, 
        Re[Sin[x + I y]], {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - UnitStep[Im[Sin[x + I y]]]), 
              sa[Abs[Im[Sin[x + I y]]]]^1.5, 
              br[Abs[Im[Sin[x + I y]]]]^1]]}}, {x, -Pi, 
        4 Pi}, {y, -4, 4},  PlotRange -> {-8, 8},  
      PlotPoints -> {150, 150}, BoxRatios -> {1.75, 1, 1.3}, 
      Ticks -> {Range[-2 Pi, 6 Pi, (Pi/2)], Automatic, Automatic}, 
      Lighting ->  False]

ParametricPlot3D[{x, y, 
        Im[Sin[x + I y]], {EdgeForm[], 
          FaceForm[
            Hue[0.0 +  .5 (1.  - UnitStep[Re[Sin[x + I y]]]), 
              sa[Abs[Re[Sin[x + I y]]]]^1, 
              br[Abs[Re[Sin[x + I y]]]]^1]]}}, {x, -Pi, 
        3 Pi}, {y, -4, 4},  PlotRange -> {-5, 5},  
      PlotPoints -> {100, 100}, BoxRatios -> {1.5, 1, 1}, 
      Lighting ->  False]

ParametricPlot3D[{Re[Sin[x + I y]], Im[Sin[x + I y]], 
        Re[Identity[x + I y]], {EdgeForm[], 
          FaceForm[
            Hue[0.25 +  .5 (1.  - UnitStep[Im[Identity[x + I y]]]), 
              sa[Abs[Im[Identity[x + I y]]]]^2, 
              br[Abs[Im[Identity[x + I y]]]]^1]]}}, {y, -15, 
        15}, {x, -15, 15},  
      PlotRange -> {{-15, 15}, {-15, 15}, {-Pi, 2 Pi}},  
      PlotPoints -> {100, 100}, BoxRatios -> {1, 1, 1}, 
      Lighting ->  False]

Riemann sphere

In the next cell I present the Riemann sphere. That is a unit sphere which is colored by all the colors from the complex plane. The South pole is black, the North pole is white.

ParametricPlot3D[{Cos[p] Sin[t], Sin[p] Sin[t], 
        Cos[t], {EdgeForm[], 
          FaceForm[
            Hue[Mod[p, 2 Pi]/(2 Pi), sa[2 Tan[((Pi - t)/2)]]^4, 
              br[2 Tan[((Pi - t)/2)]]]]}}, {p, -Pi, Pi}, {t, 0, Pi}, 
      PlotPoints -> {50, 50}, Lighting -> False, 
      ViewPoint -> {1.346,  2.644,  1.608}]

Riemann surfaces

This is an attempt to provide a domain for the square root function in which the square root would not be a multivalued function. So domain has to be extended. That is done by constructing a so called Riemann surface for the square root function.

ParametricPlot3D[{r Cos[th], r Sin[th],  
          r (Cos[th/2])/2, {EdgeForm[], 
            FaceForm[
              Hue[0.25 +  .5 (1.  - UnitStep[Im[r Exp[I th/2]]]), 
                sa[Abs[Im[r Exp[I th/2]]]]^1.75, 
                br[Abs[Im[r Exp[I th/2]]]]^1]]}}, {th, 0, 4 Pi}, {r, 0, 
          16}, AxesLabel ->  {y, x, z}, PlotPoints -> {200, 50}, 
        Lighting -> False, 
        ViewPoint -> {-2.744,  1.045,  1.202}];

ParametricPlot3D[{r*Cos[th], r*Sin[th], 
        r /2* Cos[th/2], {EdgeForm[], 
          FaceForm[
            Hue[Mod[th/2, 
                  2  Pi]/(2  
                    Pi), 
sa[Abs[Sqrt[r]]]^1.75, 
              br[Abs[Sqrt[r]]]]]}}, {th, 0, 4  Pi}, {r, 0, 
        16}, 
PlotPoints -> {200, 100}, 
      Lighting -> False, 
      ViewPoint -> {-2.744,  1.045,  1.202}]

And with a slightly different coloring:

ParametricPlot3D[{r*Cos[th], r*Sin[th], 
        r /2* Cos[th/2], {EdgeForm[], 
          FaceForm[
            Hue[Mod[th/2, 2  Pi]/(2  Pi), 
              1/(1 + 0.3 Log[Abs[Sqrt[r]] + 1]), 
              1 - 1/(1.1 + 5  Log[Abs[Sqrt[r]] + 1])]]}}, {th, 0, 
        4  Pi}, {r, 0, 3}, 
PlotPoints -> {200, 100}, 
      Lighting -> False]

And again with a slightly different parametrization and two animations.

Clear[n];   n = 2;  
    ParametricPlot3D[
      Evaluate[{r Cos[th - Pi (n - (4/2))], 
          r Sin[th - Pi (n - (4/2))],  
          r  Cos[(1/n) th], {EdgeForm[], 
            FaceForm[
              Hue[0.25 +  .5 (1.  - UnitStep[ r Sin[(1/n) th]]), 
                sa[Abs[r Sin[(1/n) th]]]^1, 
                br[Abs[r Sin[(1/n) th]]]^2]]}}], {th, 0, n 2 Pi}, {r, 0, 
        16}, BoxRatios -> {1, 1, 1}, PlotRange -> {-16, 16}, 
      Ticks -> {Automatic, {-5, 5}, {}}, 
      PlotPoints -> {360, 120}, Lighting -> False, 
      ImageSize -> 300];

Clear[n];  
    Table[ParametricPlot3D[
        Evaluate[{r Cos[th - Pi (n - (4/2))], 
            r Sin[th - Pi (n - (4/2))],  
            r  Cos[(1/n) th], {EdgeForm[], 
              FaceForm[
                Hue[0.25 +  .5 (1.  - UnitStep[ r Sin[(1/n) th]]), 
                  sa[Abs[r Sin[(1/n) th]]]^1, 
                  br[Abs[r Sin[(1/n) th]]]^2]]}}], {th, 0, n 2 Pi}, {r, 
          0, 16}, BoxRatios -> {1, 1, 1}, 
        PlotRange -> {-16, 16}, 
        Ticks -> {Automatic, {-5, 5}, {}}, 
        PlotPoints -> {250, 60}, Lighting -> False, 
        ImageSize -> 300], {n, 1, 2, (1/36)}];

Clear[n];  
    Table[ParametricPlot3D[
        Evaluate[{r Cos[th - Pi (n - (3/2))], 
            r Sin[th - Pi (n - (3/2))],  
            r  Cos[(1/n) th], {EdgeForm[], 
              FaceForm[
                Hue[0.25 +  .5 (1.  - UnitStep[ r Sin[(1/n) th]]), 
                  sa[Abs[r Sin[(1/n) th]]]^1, 
                  br[Abs[r Sin[(1/n) th]]]^2]]}}], {th, 0, n 2 Pi}, {r, 
          0, 16}, BoxRatios -> {1, 1, 1}, 
        PlotRange -> {-16, 16}, 
        Ticks -> {Automatic, {-5, 5}, {}}, 
        PlotPoints -> {150, 60}, Lighting -> False, 
        ImageSize -> 300], {n, 1, 2, (1/36)}];

Clear[n];  
    Table[ParametricPlot3D[
        Evaluate[{r Cos[th - Pi (n - (4/2))], 
            r Sin[th - Pi (n - (4/2))],  
            r  Cos[(1/n) th], {EdgeForm[], 
              FaceForm[
                Hue[0.25 +  .5 (1.  - UnitStep[ r Sin[(1/n) th]]), 
                  sa[Abs[r Sin[(1/n) th]]]^1, 
                  br[Abs[r Sin[(1/n) th]]]^1]]}}], {th, 0, n 2 Pi}, {r, 
          0, 16}, BoxRatios -> {1, 1, 1}, 
        PlotRange -> {-16, 16}, 
        Ticks -> {Automatic, {-5, 5}, {}}, 
        PlotPoints -> {150, 60}, Lighting -> False, 
        ImageSize -> 300], {n, 1, 3, (1/36)}];

Auxiliary stuff