The Art of Complex Flow Diagrams
Year: 2011 Authors: Anne Burns
Core claim
By plotting complex functions as directed colored flows along grids or selected paths, one can reveal singularity structure and generate artistic images.
Topics
complex functions, flow diagrams, singularities, visualization, vector fields
Domains
complex analysis, analytic functions, singularities, vector fields, generative art, scientific visualization, digital graphics
Methods
grid plotting, path-based plotting, color mapping, vector scaling, rotation/reflection
Media
ActionScript/Flash, digital images, printed figures
Paper text
The text below is the locally extracted OCR/Markdown version of the paper. Raw PDF files remain local and are not published here.
Bridges 2011: Mathematics, Music, Art, Architecture, Culture
The Art of Complex Flow Diagrams
Anne Burns
Department of Mathematics
Long Island University, C.W. Post Campus
Brookville, NY 11548
email: aburns@liu.edu
Abstract
Interpreting a continuous complex valued function as a vector field over its domain provides a wealth of opportunities for producing visually appealing images. Singularities and their multiplicities are easily discerned by plotting the vector field over a rectangular grid where colors are assigned as functions of length and/or direction, Some beautiful images can be produced by plotting the vector field of the function only along certain paths and inventing functions for assigning length and color to each vector produces.
Introduction
Two inspiring references sat on a shelf containing a pile of books called “to look at someday”: an article in Mathematics Magazine from February 1996, “On Using Flows to Visualize Functions of a Complex Variable” [1] and a book called “Visual Complex Analysis” [2], purchased at a mathematics conference in 1998. The diagrams of flows in both resources were intriguing, and appeared to be an excellent project for learning Actionscript, with its vector-based graphics. First concentrating on a square grid whose center was a zero or pole of the function under consideration, , and plotting the vector with tail at each grid point, and length and direction determined by the value of , the pictures were not too inspiring unless an exotic function such as near was chosen. I began experimenting with drawing the vector fields along paths enclosing singular points and scaling the length and assigning the color of each vector using a variety of formulas.
Figure 1: Inspired by the vector field of (a) along three circles centered at the origin and (b) along six circles centered at the origin.
Burns
Even as simple a function as , for a nonzero integer, inspired the images in Figures 1 and 3. The subject of vector fields and flows is a major subject for study; however in this paper I will describe just a few ideas for producing interesting and artistic images. These ideas should be accessible to a student with a little knowledge of calculus and complex numbers. Using ActionScript/Flash, animations of the images are easily produced. In this paper a complex valued function of a complex number, , is interpreted as a vector in the complex plane emanating from and the domain is restricted to a small region that contains the “interesting” points, such as zeros or poles of .
1.The Index of a Zero or Pole of a complex Function
The complex functions discussed will be assumed to be continuous; actually all the functions discussed are analytic, but continuity is all that is required. A zero of a complex function is a point where and a pole of is a point where does not exist, but exists in a neighborhood of . A singular point of is a zero or pole. The functions dealt with are “smooth”, that is if a simple closed curve surrounding a singular point and enclosing no other singular points is drawn and is calculated along this curve, is a continuously changing vector. To calculate the index of a singular point a closed curve surrounding the point and whose interior contains no other singular points is drawn. Then the vector along the curve is evaluated. The direction of the vectors as the curve is traversed in a counterclockwise direction is recorded and the number of revolutions made by these vectors is counted. Since the end point is the starting point, this number is an integer. This integer is called the index of the singular point. An example should make this clear. Consider . has a singular point at . A curve satisfying the conditions above is the unit circle. Using Figure 2a as a guide, as the unit circle (starting at any point) is traversed, the direction of the vector from each point on the circle is calculated, the vector makes two full revolutions and hence the index of the singular point, , for is 2. The importance of the index of a singular point will be made clear in the next section. In the flow diagrams considered in this paper singular points are the intersections of streamlines. It is easy to show that the streamlines, paths along which the tangent vector is equal to , are circles centered on the y-axis and tangent to the real axis as in Figure 2b.
Figure 2a. Put the tails of the vectors at a single point; then the number of revolutions made by the vector is 2.
Figure 2b. The streamlines are circles tangent to the real axis
The Art of Complex Flow Diagrams
2.Flows for the complex function where is a nonzero Integer
Just as calculus is introduced through the real valued function , for an integer, the flow of the complex function is about the simplest flow of a complex function to analyze. Start with a positive value of . Since the only zero of is at the origin, it is convenient to use a circle centered at the origin to calculate the index. The index of is the number of solutions to , which of course is . For n > 0 , using Figure 2a as a guide, start at the point (1,0) to find the vectors leaving the origin and orthogonal to circles of radius centered at the origin (pointing outward); this entails solving the equation . This becomes , or , . Thus the vectors leaving the
origin are of the form or vectors that point towards the roots of .To
find the vectors on circles of radius centered at the origin pointing inward (toward the origin) we can solve the equation . This becomes , . Thus the flow vectors pointing toward the
origin are of the form or vectors that point towards the origin from the
roots of . Look again at Figure 1.b which is a flow diagram of . By an appropriate assignment of colors it is clear that on each circle centered at the origin there are ten vectors pointing towards the origin and ten vectors pointing away from the origin. By the continuity of the function, on any circle centered at the origin the vector field has to make a complete (360 degree) turn between any two angles where the vectors point away from the origin and between any two angles where the vectors point toward the origin. Thus for a large value of (which is the index of ) there is a lot of “twirling” taking place.
Figure 3a. Flow diagram for along the circle
Figure 3b. Flow diagram for along the circles , ,
Burns
The same technique can be used to analyze the function , n > 0 . To find the outgoing vectors on a circle centered at the origin of radius solve or and to find the ingoing vectors on that circle solve . Thus there are vectors pointing outward and vectors pointing inward. In Figure 3a is a flow diagram for along the circle . Notice that there are 12 vectors pointing inward and 12 vectors pointing outward. The same observation may be clearer in Figure 3b which shows the flow along three concentric circles about the origin. Here is where the aesthetic part comes in: the artist can experiment with different formulas for the length of the vectors and the coloring scheme as in Figures 1 and 3.
3.Flows for a function with four distinct zeros
In the previous section the concentration was on the single zero of the function with index ; for a large value of , the flow diagram on a circle centered at the origin has a large number of swirls around points on the circle. The next step is to examine a function that has four singular points spaced at even intervals. The simplest such function that comes to mind is a function with four zeros evenly spaced around the unit circle, . This function has zeros at and . It is easy to check that each singular point has index 1, so one might expect to get an uninteresting picture. Not so! Figure 4a is an interpretation of the flows of this function. In Figure 4b the zeros of are indicated by small white circles.
Figure 4a. Flow diagram for along , and
Figure 4b. . The white circle is the unit circle and the four small white circles are the zeros off
Figure 5 illustrates the flow of the partial sum in the Maclaurin series for the function along a circle centered at the origin. As in all the figures the colors are a function of the angle of the flow vector.
The Art of Complex Flow Diagrams
Figure 5. Flow diagram of the partial sum in the Maclaurin series for the function
4. Transcendental Functions
Figure 6a. Flow diagram for
Figure 6b.
It is interesting to take a brief look at the flows of some transcendental functions, beginning with , where . Along the -axis, so there are singular points at , . Along the -axis . Along the lines , . Figure 6a shows the direction of the flows and Figure 6b shows a rendering in Flash/ActionScript of the flows on a rectangular grid in the -plane centered at .
Using the identity the interested reader should plot the flow diagram and experiment with drawing the flows along selected paths. Examples are shown in Figure 7.
Burns
Figure 7a. Flow for centered at the origin
Figure 7b. with a restricted domain
Interesting images can be made using the flows of other transcendental functions in neighborhoods where such functions have singular points. Examples are or near . Figure 8 is a diagram of the flow of along concentric circles surrounding the origin. Obtaining an image such as this requires a lot of experimentation with recipes to control the length of vectors in the image, as near the origin the length of a vector is astronomical; for instance is when Figure 8 illustrates one attempt. Interesting images can be obtained from composite functions such as or products or quotients of polynomials and transcendental functions.
Figure 8. Flows inspired by
The Art of Complex Flow Diagrams
5.Flows along other paths
In all the examples so far except for Figures 6 and 7 the flow vectors have been calculated along circles. It is possible to illustrate the flows along other paths. In Figure 9 flows of two different functions have been drawn along the curve and the resulting images have been rotated about the origin.
Figure 9a. Flow along the path of then rotated 3 times about
Figure 9b. Flow along the path of then rotated 4 times about
In Figure 10 the path along which the flow is calculated is , , . Here . As in the previous figure the image has been reflected and then rotated. Another approach is used in the images in Figures 11 and 12. Here the flow has been calculated along one path in the complex plane, but plotted along a second path.
For the image in Figure 11a the parameters for the path along which the flow is calculated are: , , and . The parameters for the path along which the flow is calculated for the image in Figure 11b are: , , and . Again both images have been reflected and rotated.
Figure 10. Different paths for flow and plot
Burns
Figure 11a. Different paths for flow and plot
Figure 11b. Different paths for flow and plot
Conclusion
The images in this article are a result of my first experiments with visualizing a complex valued function as a two dimensional flow. I have only scratched the surface and I am excited about the possibilities. It appears to be a promising area for further research. One area for future work might be the application of some of these ideas to higher dimensional flows, or to flows arising from differential equations
Figure 12. The flow is calculated along one path, but plotted along another.
References
[1] Tyre Newton and Thomas Lofaro, On Using Flows to Visualize Functions of a Complex Variable, Mathematics Magazine, Vol. 69, No. 1 February 1996 [2] Tristan Needham, Visual Complex Analysis, Oxford University Press Inc., New York, 1997, ISBN 0 19 853446