[go: up one dir, main page]

0% found this document useful (0 votes)
130 views23 pages

Visualization of Complex Functions: Bernd Thaller, University of Graz, Austria Source

The document describes a method for visualizing complex functions using color. It defines a mapping from the complex plane to a sphere, where the azimuthal angle corresponds to the argument of the complex number and the polar angle corresponds to the absolute value. It then maps colors from the surface of the sphere to the surface of the RGB color cube in a way that the lightness varies linearly with the polar angle, with black at the south pole and white at the north pole, and the hue varies with the azimuthal angle. This allows an intuitive visualization of complex functions through colored density plots.

Uploaded by

robertunp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views23 pages

Visualization of Complex Functions: Bernd Thaller, University of Graz, Austria Source

The document describes a method for visualizing complex functions using color. It defines a mapping from the complex plane to a sphere, where the azimuthal angle corresponds to the argument of the complex number and the polar angle corresponds to the absolute value. It then maps colors from the surface of the sphere to the surface of the RGB color cube in a way that the lightness varies linearly with the polar angle, with black at the south pole and white at the north pole, and the hue varies with the azimuthal angle. This allows an intuitive visualization of complex functions through colored density plots.

Uploaded by

robertunp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

complexvis.

nb

Visualization of Complex Functions


Bernd Thaller, University of Graz, Austria
Source:
This article appeared first in
The Mathematica Journal 7(2), 163-180 (1998),
The package ComplexPlot.m described in this article is now part of the Visual-Quantum-Mechanics (VQM) packages. The
VQM-packages are a collection of Mathematica packages, distributed with the book "Advanced Visual Quantum Mechanics", Springer-Verlag 2004. They can also be downloaded from
http://vqm.uni-graz.at/pages/dl_vqm_packages.html
The article has been updated to reflect the changes in the package since 1998.
Date: 2004-08-08

Introduction

Functions f Hx, yL of two variables with values in the field of complex numbers, such as analytic functions, are often considered abstract mathematical objects which are difficult to imagine. Indeed, the graph of such a function would have to be
drawn in a four-dimensional space (with coordinates x, y, ReH f L, ImH f L), which cannot easily be done on a sheet of paper.
Therefore, several aids for visualizing complex functions have been developed. For example, the standard package ComplexMap.m by Roman Maeder illustrates how the function transforms and distorts the complex plane. Another method uses
colors for the visualization of complex values. The standard package ArgColors.m specifies colors to describe the argument of complex numbers. This color map is also used in Kevin McIsaac's package ComplexPlot3D.m [McIsaac].
Here we propose a refined color map of the complex plane. The color map is continuous and one-to-one from the complex
plane onto the surface of the color manifold. In addition to describing the argument of a complex number by the hue of the
color, the color map uses the lightness of the color to represent the absolute value. Thus the color map is suitable for colored
density plots of complex functions. The package ComplexPlot.m provides commands to produce intuitive pictures of
complex-valued functions, including density plots and surface plots. Since the human eye usually cannot recognize the
precise color values, our method is not suited for a quantitative representation, but it can be used to give a quick impression
of the most important qualitative properties of the complex function, such as the position and order of poles and zeros. The
method is particularly useful for the visualization of quantum mechanical wave functions [Pauschenwein and Thaller 1996].

complexvis.nb

The Color Map


The complex numbers form a two-dimensional manifold which is usually described as a plane with coordinates x = ReHzL and
y = ImHzL. Sometimes polar coordinates r = z and f = ArgHzL are also used to represent points in the complex plane. For
our purpose, the representation of complex numbers as points Hq, fL on a sphere is more suitable. This representation is given
by the method of stereographic projection. Consider a sphere of radius r0 centered at the origin of the three dimensional
space. Let us interpret the x-y plane as the complex plane. From a point Hx, y, 0L corresponding to z = x + i y = r ei f , we draw
a straight line to the north pole H0, 0, r0 L of the sphere. The intersection of the line with the surface of the sphere maps each
point of the complex plane in a one-to-one way to a point on the surface. Using spherical coordinates Hq, fL on the sphere, we
find that the azimuthal angle is just the phase f = ArgHzL, while the polar angle q depends only on r = z and on r0 :
r
q@r_, r0_D := p - 2 ArcTanA E
r0

The origin z = 0 of the complex plane is mapped to the south pole q = p . The north pole q = 0 is the image of a complex
"number" which has an undefined phase (like the origin) and has an infinite absolute value. Mathematica uses the symbol
ComplexInfinity (which is the same as DirectedInfinity[]) to represent this object. The complex numbers with
z = r0 are represented by the equator of the sphere. All complex numbers with absolute values bigger than r0 are mapped
to the northern hemisphere, and the points with z r0 are mapped onto the southern hemisphere.
The manifold of colors that can be represented in a computer is three dimensional. In the most frequently used RGB system,
the colors are described by coordinates HR, G, BL that give the intensities of the "primary" colors red, green, and blue. The
graphics directive RGBColor[R,G,B] accepts arguments in the range @0, 1D . Thus, in Mathematica the color manifold is
represented by the three-dimensional unit cube. The corners of the cube represent the additive primary colors red H1, 0, 0L ,
green H0, 1, 0L , blue H0, 0, 1L , and the subtractive primary colors yellow H1, 1, 0L , cyan H1, 0, 1L, magenta H0, 1, 1L . The
remaining corners are black H0, 0, 0L and white H1, 1, 1L . All shades of gray are on the main diagonal from black to white.
A color code for complex numbers can be obtained by defining a one-to-one mapping from the surface of the sphere into the
manifold of colors. To do this in a natural way, it is useful to have a short look at some less familiar coordinate systems for
colors. (For more information on color systems, see [Smith and Blachman 1995].)
The distance of a color C = HR, G, BL from the origin measured in the maximum metric is called the brightness,
bHCL = max 8R, G, B<. The distance from a gray point with the same brightness is called saturation,
sHCL = max 8R, G, B< - min 8R, G, B<. Note that the possible values of the brightness b are between 0 and 1, and for each
value of b the saturation varies between 0 (gray) and smax (b) = b. The set of all colors with constant saturation s and brightness b is hence a closed polygonal curve Gs,b with length 6s (which is formed by six edges of a cube, each of length s).

The hue h(C) of a color C is l 6 s , where l is the length of the part of Gs,b between C and the red corner of Gs,b (the corner
with maximal red component) in the positive direction (counter-clockwise, if viewed from the white corner). That means
h = 0 and h = 1 both correspond to the red corner and it is most natural to define the hue as a cyclic variable modulo 1.
Hence the colors at the corners of Gs,b (which are red, yellow, green, cyan, blue, and magenta with saturation s and brightness
b) have the hue values 0, 1 6, 1 3 , 1 2 , 2 3 , and 5 6 (mod 1). The built-in color directive Hue[h,sb ,b] defines a color in
terms of its hue h, the (scaled) saturation sb = s b, and brightness b (the HSB color system). The saturation sb is scaled so
that its values at a given brightness b range between 0 and 1.
It is sometimes considered a drawback of the HSB system that the "pure" colors red, yellow, green, and so on (the corners of
the RGB cube) by definition have the same brightness as white (b = 1 ). The definition of the lightness is designed to give a
quantity that describes the human perception more accurately.

For any color C = HR, G, BL, the lightness l(C) is defined as the average of the maximal and the minimal component,
lHCL = Hmax 8R, G, B< + min 8R, G, B<L 2 = bHCL - sHCL 2 . We have 0 l 1. At a given lightness l, the brightness b ranges
in l b min 81, 2 l<. Hence lightness l = 0 denotes black, and l = 1 (that is, b = 1, s = 0) is white. The maximal saturation
smax at a given lightness l is l for l 1 2 and 2 - 2 l for l 1 2 . The set of color points that have maximal saturation with
respect to their lightness is just the surface of the RGB color cube. On the surface, the brightness is also maximal, so that
b = 2 l for l 1 2 and b = 1 for l 1 2 . Thus the pure colors have lightness 1 2 and maximal saturation. The standard

complexvis.nb

For any color C = HR, G, BL, the lightness l(C) is defined as the average of the maximal and the minimal component,
lHCL = Hmax 8R, G, B< + min 8R, G, B<L 2 = bHCL - sHCL 2 . We have 0 l 1. At a given lightness l, the brightness b ranges
in l b min 81, 2 l<. Hence lightness l = 0 denotes black, and l = 1 (that is, b = 1, s = 0) is white. The maximal saturation
smax at a given lightness l is l for l 1 2 and 2 - 2 l for l 1 2 . The set of color points that have maximal saturation with
respect to their lightness is just the surface of the RGB color cube. On the surface, the brightness is also maximal, so that
b = 2 l for l 1 2 and b = 1 for l 1 2 . Thus the pure colors have lightness 1 2 and maximal saturation. The standard
package Color.m defines the color directive HLSColor[h,l,sl ] which describes a color in terms of hue h, lightness l, and
saturation sl = s smax HlL, where this time the saturation is scaled so that its values at a given lightness range between 0 and 1.
Hence the colors at the surface of the color manifold are described by HLSColor[h,l,1] or equivalently by Hue[h,1,2l] for
l 1 2 and Hue[h,2-2l,1] for l 1 2 .
The colors on the surface of the color manifold have maximal saturation (in the HLS system) and can therefore be distinguished most easily. It is therefore most natural to color the sphere (and hence the complex plane) by defining a continuous
mapping from the points Hq, fL of the sphere onto the surface of the color manifold. This can be done most easily in the HLS
color system.

Our color map associates the point Hq, fL on the sphere to the color given by HLSColor[f H2 pL, 1 - q p, 1 ]. We have
chosen a linear dependence of the lightness on the polar angle q such that the south pole (z = 0 , q = p ) has lightness 0 (black),
and the north pole (ComplexInfinity, q = 0) appears with lightness 1 (white). The colors on the sphere have maximal
saturation 1 in the HLS system and thus have maximal contrast. The cyclic variable hue is most naturally associated to the
azimuthal angle f, which corresponds to the argument of the complex number z. The pure colors red, yellow, green, and so
on, are on the equator of the sphere. They correspond to complex numbers with z = r0 . The points more to the north
appear lighter, the points on the southern hemisphere are darker. Figure 1 shows a visualization of the color map of the
sphere. The color map of the complex plane is shown in Figure 2.
<< Graphics`Colors`
coloredCircle@q_, steps_D := ModuleA8pts, lns, lst, s = Sin@qD<,

2. p
pts = TableA8s Cos@phiD, s Sin@phiD, Cos@qD<, 9phi, 0., 2. p, =E;
steps
lns = Line Partition@pts, 2, 1D;
q
1
lst = TableAHLSColorAh, 1 - , 1E, 9h, 0., 1., =E;
p
steps - 1
Transpose@8lst, lns<DE

N@pD
coloredSphere@steps_, circles_D := TableAcoloredCircle@q, stepsD, 9q, 0., p, =E
circles
graph = Graphics3D@8Thickness@0.01D, coloredSphere@30, 30D<D;

complexvis.nb

Show@graph, Background GrayLevel@0.7D, Axes True,


Ticks None, AxesLabel 8x, y, z<, ViewPoint 81.784, -2.628, 1.178<D;

x
Figure 1. The color map of the complex sphere.

Finally, our color map for complex numbers (given in polar coordinates r = z and f = ArgHzL) can be defined as
light@q_D := N@1 - q pD
ComplexToColorMap@r_, f_, r0_: 1.D :=
Module@8li = light@q@r, r0DD<,
Hue@Mod@f 2 p, 1D,
If@li <= 0.5, 1, 2 - 2 liD,
If@li <= 0.5, 2 li, 1DD D

Surface Plots and Density Plots


The color map defined in the previous section makes it easy to produce surface plots of complex-valued functions.
ComplexPlot3D@func_, 8x_Symbol, x1_, x2_<, 8y_Symbol, y1_, y2_<, optns___RuleD := Plot3D@
8Abs@funcD, ComplexToColorMap@Abs@funcD, Arg@funcDD<, 8x, x1, x2<, 8y, y1, y2<, optnsD

complexvis.nb

ComplexPlot3D@Sin@x + I yD, 8x, -p, p<, 8y, -1, 1.5<, PlotPoints 20D;

2
1.5
1
0.5
0

1.5
1
0.5
-2

0
0

-0.5
2

-1

Here the height of the surface shows the absolute value z of a complex number z, while the color is defined according to
ComplexToColorMap.
Finer details or rapid oscillations of complex functions would be better represented in a sort of density plot. Unfortunately,
the command DensityPlot can only use color functions that depend on a single real variable (the value of the real function
to be plotted). Therefore, ComplexToColorMap cannot be used with the option ColorFunction. However, we can use the
graphics primitive RasterArray to define a two-dimensional array of rectangles that are colored according to our convention. The following command plots a "density graphic" of an array of complex numbers:
ListComplexDensityPlot@valuearray_, optns___D :=
Module@8colors<,
colors =
MapThread@ComplexToColorMap@#1, #2D &,
8Abs@valuearrayD, Arg@valuearrayD<, 2D;
Show@Graphics@RasterArray@colorsD, optnsDD
D

For this array of complex values,


A = Table@Tan@x + I yD, 8y, -1, 1, .1<, 8x, -N@ PiD, Pi, N@Pi 10D<D;

the plot clearly shows the zeros (black) and poles (white) of the complex function tanHzL.

complexvis.nb

ListComplexDensityPlot@A, AspectRatio -> 1D;

The package ComplexPlot.m is based on the ideas and definitions described above.

The Package ComplexPlot.m


The main goal in designing the package has been to define a command ComplexDensityPlot that behaves like the built-in
DensityPlot. Moreover, the package contains commands for colored surface plots and contour plots of complex functions.
If the package and its documentation are placed in a subdirectory VQM of the AddOns/Applications directory, it can be
loaded with the command
<< VQM`ComplexPlot`

(We don't have to restart the kernel, because the package prevents shadowing [Wagner 1996]. As a replacement for the
previously defined commands ComplexPlot3D and ListComplexDensityPlot the package defines the commands QComplexPlot3D and QListComplexDensityPlot. Note that all symbols defined by the VQM packages start with the letter Q.)
To make the documentation accessible through the Help Browser, create the directory AddOns/Applications/Graphics/Documentation/English and put the files BrowserCategories.m, BrowserIndex.nb, ComplexPlot.nb, and CPcmds.nb in this directory. After executing the command Rebuild Help Index in the Mathematica front
end, the new help topics should be available.

complexvis.nb

The command QComplexDensityPlot[f[x,y],{x,xmin,xmax},{y,ymin,ymax}] implements an analogue of DensityPlot for


complex-valued functions. It generates a two-dimensional raster of colors which are determined from the complex values of f
according to the color map discussed in the previous section. For example, the following command gives a colored density
plot of the identity function, which illustrates our color map of the complex plane.
QComplexDensityPlot@x + I y, 8x, -3, 3<, 8y, -3, 3<D;
Arg::indet : Indeterminate expression Arg@0. + 0. D encountered.

More

-1

-2

-3
-3

-2

-1

Figure 2. The color map of the complex plane.


Note that red is positive real. The complex numbers on the unit circle have maximal brightness and saturation (lightness
1 2 ). For z on the unit circle, -z has the complementary color. A complex zero appears black. The warning is printed
because the argument (and hence the hue) of zero is not defined. Other exceptional values producing error messages are
ComplexInfinity and Indeterminate. You can turn these messages off using the command
Off@Arg::indetD

Density plots are well suited for displaying fine details of functions at high resolutions. We can increase the resolution using
the option PlotPoints. For plots at high resolution, we should turn off the mesh lines. The following command takes a long
time on slow computers.

complexvis.nb

1
QComplexDensityPlotA ,
HHx + I yL5 - 2L2

8x, -1.5, 1.5<, 8y, -1.5, 1.5<, PlotPoints 200, Mesh FalseE

1.5

0.5

-0.5

-1

-1.5
-1.5

-1

-0.5

0.5

1.5

-QColorDensityGraphics-

The bright points indicate the five poles of the function f HzL = Hz5 - 2L-2 . It can be seen that the poles are of second order,
because all colors appear twice on a small circle around the pole.
The command QComplexDensityPlot returns a graphics object called QColorDensityGraphics, which can be transformed into other graphics objects, such as ContourGraphics, DensityGraphics, or SurfaceGraphics.

complexvis.nb

Show@SurfaceGraphics@%D, Axes -> True, AspectRatio -> Automatic, PlotRange -> 80, 2<D;

2
1.5
1

0.5
0
0
-1
0

-1
1

The package provides the command QComplexPlot3D for three-dimensional surface plots of complex functions. The graphics above can also be generated using the command
1
QComplexPlot3DA , 8x, -1.5, 1.5<,
HHx + I yL5 - 2L2
8y, -1.5, 1.5<, PlotPoints 200, Mesh FalseE

0.6
0.4
1

0.2
0
0
-1
0

-1
1

SurfaceGraphics

Here is another example:

complexvis.nb

10

QComplexPlot3D@4 Exp@-x2 - y2 D Sin@Hx + I yL2 D, 8x, -2, 2<, 8y, -2, 2<D

2
1.5

1
0.5
0
-2

1
0
-1
-1

0
1
2 -2
SurfaceGraphics

You can specify your own color map by setting the option QComplexToColorMap.
newcolormap = Function@8r, f<, Hue@Mod@r 4, 1D, Mod@f p, 1D, 1DD;

QComplexDensityPlot@x + I y, 8x, -4, 4<, 8y, -4, 4<, QComplexToColorMap newcolormapD;

-2

-4
-4

-2

The default color map is given by the symbol $QComplexToColorMap. There are various options for modifying this built-in
color map. The option QSphereRadius sets the radius of the sphere used for the stereographic projection. The default value
is 1. Setting QSphereRadius to R causes all complex numbers with z = R to be colored with lightness 1 2 (maximal
brightness and saturation). This setting is useful if we want to investigate complex functions in regions where the absolute
value is very small or very large compared to 1.

complexvis.nb

11

The default color map is given by the symbol $QComplexToColorMap. There are various options for modifying this built-in
color map. The option QSphereRadius sets the radius of the sphere used for the stereographic projection. The default value
is 1. Setting QSphereRadius to R causes all complex numbers with z = R to be colored with lightness 1 2 (maximal
brightness and saturation). This setting is useful if we want to investigate complex functions in regions where the absolute
value is very small or very large compared to 1.
If we are interested only in a certain range of values, we can set the option QValueRange to a range 8vmin , vmax < , which
displays complex numbers with absolute values larger than vmax at maximal lightness, and complex numbers with
z < vmin at minimal lightness. The values for maximal and minimal lightness are controlled by the QLightnessRange
option and are set by default to {0,1}.
gr = QComplexDensityPlot@Hx + I yL2 , 8x, -5, 5<,
8y, -5, 5<, QValueRange 85, 25<, QSphereRadius 10D;

-2

-4

-4

-2

It is also possible to set vmax < vmin . A plot of f Hx + i yL with QValueRange set to {,0} is the same as a plot of
1 f Hx - i yL with the default setting of {0,}.
The QColorDensityGraphics object stores the table of colors obtained by applying the color map to the complex values.
Thus, we can quickly redraw the plot with modified Graphics options, such as AspectRatio, MeshStyle, or FrameLabels. (We can't modify the options that control the color map in this way.)

complexvis.nb

12

Show@gr, Mesh False, Frame None, Axes True, AxesStyle RGBColor@1, 0, 0DD;

Sometimes, a contour plot displays the absolute value of a function more clearly than a density plot. The package provides a
command for combining ContourPlot with ComplexDensityPlot:

complexvis.nb

13

QComplexContourPlot@Gamma@x + I yD, 8x, -3, 4<,


8y, -2, 2<, PlotPoints 100, PlotRange 80, 5<, Contours 5D;

-1

-2
-3

-2

-1

Note that the option PlotRange only affects the range of the contours. You have to use the QValueRange option to influence
the colors. In the following plot, contours are used to represent values where 0 f HzL 0.5 and colors are used for the
range 0.5 f HzL 1 .

complexvis.nb

14

QComplexContourPlot@Sin@xD Cos@yD, 8x, -Pi, Pi<, 8y, -Pi, Pi<,


Contours -> 5, PlotRange -> 80, 0.5<,
QValueRange -> 80.5, 1<, ContourStyle -> GrayLevel@1D, PlotPoints -> 40D;

-1

-2

-3
-3

-2

-1

Finally, there is a command QColorArrayPlot for plotting a two-dimensional raster of color directives. It can be used to
display color images in Mathematica. The following auxiliary function reads a picture file in non-interleaved "raw format,"
that is, a stream of bytes describing the color information, without a header. Many image editing programs (such as Adobe
Photoshop) can save pictures in raw format.
GetPicture@pathname_, width_, height_D :=
Module@8pixels = ReadList@pathname, ByteD, rd, gr, bl<,
rd = Table@pixels@@i + width jDD,
8j, height - 1, 0, -1<, 8i, 1, width<D 255.;
gr = Table@pixels@@i + width Hj + heightLDD,
8j, height - 1, 0, -1<, 8i, 1, width<D 255.;
bl = Table@pixels@@i + width Hj + 2 heightLDD,
8j, height - 1, 0, -1<, 8i, 1, width<D 255.;
MapThread@RGBColor, 8rd, gr, bl<, 2D
D

Here is an example:
colorarray = GetPicture@"insert_pathname_to_file_hereshuttle.raw", 72, 50D;

complexvis.nb

15

QColorArrayPlot@colorarray, Frame -> None,


AspectRatio -> Automatic, Mesh -> FalseD;

The Zeta Function


We will illustrate the usefulness of the package ComplexPlot.m by investigating graphically the famous Riemann zeta
function zHzL, which has a rich and interesting structure [Karatsuba and Voronin 1992]. This function is defined as the
analytic continuation to the whole complex plane of the function

1

x
n=1 n

Zeta@xD

which is initially given only for x > 1. The zeta function is meromorphic everywhere with a single pole at z = 1 . The Riemann hypothesis is the conjecture that all zeros with ReHzL > 0 lie on the "critical line" ReHzL = 1 2 [Aizenberg et al. 1997].
The only zeros with ReHzL 0 are simple zeros at the negative even integers. The Riemann zeta function plays a prominent
role in number theory, because its properties are related to the distribution of prime numbers.
The function zHzL has absolute values ranging over many orders of magnitude within small regions. Usually, surface plots of
such functions are not very useful, so we use a QColorDensityPlot for the visualization. (The following high-resolution
plot takes several minutes on a Power Mac 8500. You should decrease the number of plot points on slower computers.)

complexvis.nb

16

QComplexDensityPlot@Zeta@x + I yD, 8x, -20, 5<, 8y, -16, 17<, Mesh False, PlotPoints 300D;

15

10

-5

-10

-15
-20

-15

-10

-5

We can see the pole at z = 1 and the first of the zeros along the critical line ReHzL = 1 2 . The phase information is hidden in
the regions that are black or white, where the absolute value of zHzL is very small or large compared to 1. We can make this
information visible by restricting the maximal and minimal lightness of the colors in the graphic. If we set QLightnessRange to {0.5,0.5}, the information on the absolute value is totally supressed. The following plot gives the phase information for the same region as in the plot above:

complexvis.nb

17

QComplexDensityPlot@Zeta@x + I yD, 8x, -20, 5<, 8y, -16, 17<,


Mesh False, PlotPoints 300, QLightnessRange 80.5, 0.5<D;

15

10

-5

-10

-15
-20

-15

-10

-5

We can have a closer look at the region of z for which zHzL is very small by setting QSphereRadius to some small value.
The following plot enlarges the black region of the first graphics and displays the values with zHzL = 0.005 with maximal
brightness and saturation:

complexvis.nb

18

QComplexDensityPlot@Zeta@x + I yD, 8x, -11, -1<,


8y, -2, 2<, Mesh False, PlotPoints 200, QSphereRadius 0.005D;

-1

-2
-10

-8

-6

-4

-2

This plot shows clearly the zeros (all of first order) of the zeta function in the region under consideration. The zeros are
located at the negative even numbers. The zeros at -16, -18, -20 are already visible in the first plot. To look at the behavior of
the zeta function near the zero at z = -20, we have to increase QSphereRadius. Otherwise, the following plot would show
only a tiny black point in a white surrounding:

complexvis.nb

19

QComplexDensityPlot@Zeta@x + I yD, 8x, -21, -19<,


8y, -1, 1<, Mesh False, PlotPoints 100, QSphereRadius 50D;

0.5

-0.5

-1
-21
This is an even more extreme example:

-20.5

-20

-19.5

-19

complexvis.nb

20

QComplexDensityPlot@Zeta@x + I yD, 8x, -31, -29<, 8y, -1, 1<,


Mesh -> False, PlotPoints -> 100, QSphereRadius -> 10 ^ 8D;

0.5

-0.5

-1
-31

-30.5

-30

-29.5

-29

To display the behavior near the critical line and the precise position of the zeros, a contour plot seems most appropriate.

complexvis.nb

21

QComplexContourPlot@Zeta@x + I yD, 8x, -1.4, 3<, 8y, -2, 42<,


PlotPoints 850, 500<, PlotRange 8-1.3, 8<, AspectRatio 5D;

40

30

20

10

-1

complexvis.nb

22

The colors of the graphic show that the poles and zeros of the Riemann zeta function are of first order. Finally, we show a
high-resolution surface plot of the zeta function in the same region.
QComplexPlot3D@Zeta@x + I yD, 8x, -1, 3<, 8y, -2, 38<,
Mesh False, PlotPoints 8100, 250<, PlotRange -> 80, 10<,
QSphereRadius -> 3, ViewPoint -> 82.504, -2.085, 0.910<, BoxRatios -> 81, 2, 1<D;

-1 0

10
8
6
4
2
30

20
10
0

Many other examples can be seen on my web page dedicated to the visualization of complex functions: http://vqm.unigraz.at/pages/complex/

References
Aizenberg, L., V. Adamchik, and V.E. Levit. 1997. Approaching the Riemann hypothesis with Mathematica. The Mathematica Journal 7(1): 54-57.
Karatsuba, A.A., and S.M. Voronin. 1992. The Riemann Zeta-Function. De Gruyter Expositions in Mathematics 5. Walter de
Gruyter. Berlin. New York.
McIsaac, Kevin. ComplexPlot3D.m. Mathematica package. Available from MathSource as item 0200-484,
http://www.wolfram.com/cgi-bin/msitem?0200-484. See also Roman Maeder, The Mathematica Programmer, p.187. Academic Press 1994.
Presently (2004), this package seems to have disappeared from MathSource and from the internet.
Pauschenwein, J., and B. Thaller, 1996. Visualizing quantum-mechanical wavefunctions in three dimensions with AVS.
Computers in Physics 10(6): 558-566.
Smith, C., and N. Blachman. 1995. The Mathematica Graphics Guidebook. Addison-Wesley.
Wagner, D.B. 1996. Contexts and shadowing. The Mathematica Journal 6(2): 41-51.

complexvis.nb

Bernd Thaller
Institute for Mathematics and Scientific Computing
University of Graz
Heinrichstr. 36
A-8010 Graz
Austria
bernd.thaller@uni-graz.at
http://vqm.uni-graz.at/

23

You might also like