]>
Here is another way to graph a complex function of complex arguments. For each complex value , compute , again expressing the value in polar coordinates . We draw the complex valued function, again considering the -plane as the complex plane, using as the height (or -coordinate) and as the color. This is a standard plot---we learned how to do this in Chapter ugGraph --- but here we write a new program to illustrate the creation of polygon meshes, or grids.
Call this function drawComplex. It displays the points using the ``mesh'' of points. The function definition is in three parts.
Variables and give the step sizes along the real and imaginary directions as computed by the values of the global variables and . The mesh is represented by a list of lists of points , initially empty. Now alone is ambiguous, so to set this initial value you have to tell Axiom what type of empty list it is. Next comes the loop which builds .
The code consists of both an inner and outer loop. Each pass through the inner loop adds one list of points to the list of lists of points . The elements of are collected in reverse order.
The operation mesh then creates an object of type ThreeSpace(DoubleFloat) from the list of lists of points. This is then passed to makeViewport3D to display the image.
Now add this function directly to your vectors.input file and re-read the file using read vectors. We try drawComplex using a user-defined function .
Read the file.
This one has a pole at .
Draw it with an odd number of steps to avoid the pole.