This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Add-ons / Standard Packages / Graphics  /


To plot the graph of a complex-valued function of a complex variable, four dimensions are required: two for the complex variable and two for the complex function value. One method to circumvent the need for four-dimensional graphics is to show how the function transforms sets of lines that lie in the complex plane. Each line will be mapped into some curve in the complex plane and these can be represented in two dimensions.
The functions CartesianMap and PolarMap defined in this package make pictures of this form. CartesianMap shows the image of Cartesian coordinate lines while PolarMap shows the effect on polar coordinate lines.

Plotting the image of coordinate lines in the complex plane.

  • This loads the package.
  • In[1]:= <<Graphics`ComplexMap`

  • We set the option Frame->True to get frame axes on all our plots.
  • In[2]:= SetOptions[Graphics, Frame -> True];

  • This shows the Cartesian grid.
  • In[3]:= CartesianMap[Identity, { -5, 5}, { -5, 5}]

  • This is the polar coordinate system.
  • In[4]:= PolarMap[Identity, { 0, 1}, { 0, 2 Pi}]

  • Here is the image of the Cartesian grid under exponentiation.
  • In[5]:= CartesianMap[Exp, { -1, 1}, { -2, 2}]

  • The square root function halves the angle of each complex number. The starting point is moved slightly from -Pi to avoid problems with the branch cut of the square root function.
  • In[6]:= PolarMap[Sqrt, { 0, 1}, { -Pi + 0.0001, Pi}]

    A more detailed description and discussion of this package is given in the book Programming in Mathematica, Third Edition, by Roman E. Maeder.