Complex Function Grapher

This applet graphs complex functions where the domain is the base plane, the modulus is graphed on the vertical and the color represents the arguments. See the help text for more details.

Help Text

Graphing a complex function is difficult because you need 2 (real) dimensions for the domain and 2 (real) dimensions for the range - a total of 4 dimensions. In this applet, the domain of a complex function is graphed on the base plane. The range is graphed using polar coordinates. The modulus (magnitude) of the complex function is graphed on the vertical axis. The argument (angle) is graphed by using different colors - light blue for positive real, dark blue (shading to purple) for positive imaginary, red for negative real, and yellow-green for negative imaginary. This allows four dimensions to be represented in three spatial dimensions, which are then projected onto a two dimensional screen using a simple orthogonal projection.

Enter complex functions into the f(z) = text box using standard calculator notation. You must use * for multiplication, i.e. 2*z not 2z. Functions must have parentheses, i.e. sin(z) not sin z. The parser understands the following operations, functions, and constants: +, -, *, /, ^, sqrt(), sin(), cos(), tan(), exp(), ln(), log() (synonymous with ln), sinh(), cosh(), abs(), mod() (synonymous with abs), arg(), conj(), e, pi, i.

To adjust the domain of the graph, right-click (or shift-click if you have a one-button mouse) on the graph. The domain editor only accepts numerical input, i.e. 3.14 not pi.

One referee tried checking identities using this applet and discovered some peculiar effects which are explained here.

Return to top

Typical Assignments

I usually go over a couple of graphs with students in class the first time I introduce this applet to be sure they understand what they are looking at. For example, we will look at the first three functions listed under the argument principle below in class. I use both the Top View and the Side View initially; afterwards students often use both views but occasionally find just one view is sufficient for a particular assignment. Once the students are comfortable with the graphs, I have them work look at graphs and discuss them in pairs, then write short individual answers about what they observe, often asking them to verify mathematically patterns they notice. I've listed typical graphs I ask students to look at when studying particular ideas below. Return to top

Documentation and Source Code

The documentation was produced with javadoc and is designed to document the use of the classes developed for this applet for programmers who want to use the classess as-is in their own projects. Commented source code is also provided for programmers who want to modify these classes and also for the applet itself (which is basically just a user-interface). The code is copyrighted but may be used freely for non-commercial purposes provided the original source is acknowledged and the author is informed. Contact the author at bennett@math.ksu.edu

File Documentation Source Code
CompGraph Using the CompGraph class CompGraph.java
Functionz Using the Functionz class Functionz.java
Complex Using the Complex class Complex.java
CGApplet CGApplet.java

Return to top


Please report any problems with this page to bennett@math.ksu.edu
©2001 Andrew G. Bennett