So it's been a while since I last posted anything to this blog, and I really want to change that. I recently created a series of mathematical animations, all based on the same function. But I wanted to do more than just share these animations, I wanted to explain how I made them and the interesting features I discovered in the process. I thought about making a video for this purpose, as there are plenty of educational channels on YouTube nowadays. But I’m not that great at public speaking, and I did not want my presentation to detract from the animations themselves. Thus I decided to write this blog post.
First of all, I was able to generate this function by building up a polynomial by its roots. Technically the function is a rational function, with a pole at zero, but let's not get nit-picky. I describe how I am able to build up polynomials and rational functions in another blog post, so I wont be going over that here. For the purposes this blog post, our function is defined as follows:
In case that wasn't entirely clear, I will try to break the function down piece by piece. First of all, our function is a rational function with roots at r0, r1, and r2, and a pole at the origin. These roots are further defined in terms of an extra parameter t. This parameter increases as our animation progresses, causing the location of the roots to move. But they don't move in any old pattern, they actually orbit the pole in the center.
Because we are exponentiating a purely imaginary number, this results in a rotation in the complex plain. That's what causes our roots to orbit the center. By multiplying by a constant value, this changes the magnitude of our result, effectively changing the radius of our orbit. That way, each of our roots circle in their own orbit. Also notice the multiplier of the first root is negative. This is equivalent to a rotation by half, so it starts on the opposite side of the pole as the other two roots.
Notice also, that each t value is multiplied by a constant before taking the exponential. This determines the period of the roots orbit. Originally, I tried several different ratios for the orbital periods. I even tried setting them all to be prime numbers. This lead to a very long animation, since the animation only repeats for t values that are evenly divisible by all of the periods. The roots also seemed to spend a lot of time bunched up together, which led to some rather dull animations.
Taking inspiration from the moons of Jupiter, I decided to place the roots in Laplace resonance of each other. This special configuration guarantees that no more than two moons (or roots) are ever in conjunction at the same time. That is, it keeps the roots fairly spaced out, so that they don't clump up together. That’s why the first root starts on the opposite side of the origin, hence the negative multiplier. It also made the animation substantially shorter, which was a bonus.
This is really cool, as the roots are sort of the critical points of our function. For creating fractals, the zeros become our attractor points, and in image maps the zeros correspond to the nadir of our image, effectively creating a “little planet” around each root. Take a look at some of the still frames below, to see what I mean:
The first example is a simple domain coloring, as I explained in my previous blog post on building functions. You can clearly see where the roots are as the image turns to black, while the white point in the center is our pole. The colors bend around the roots in a unique way to connect each root and pole, and fill in our image.
The next example was generated using Newton's method to find the roots of our polynomial. For those who don't know, Newton's method is a strategy for finding the roots of any function, not just polynomials. It requires an initial guess which we take to be the input of our function. Then we iterate until our output converges to one of our roots. Then we color it based on which root we found. That’s why there are only three colors in the above image, because we only have three roots.
The last example uses a mapping from a panoramic image that I took inside a cathedral in Brunswick. These are full spherical images that provide a 360 by 180 field of view. We can use stereographic projection to project our image onto the complex plane. We then use this image to domain color our function. This way the roots of our function map to the nadir, while the pole in the center maps to the zenith. This is what gives us a “little planet” around each root.
While looking at the images, particularly the panoramic maps, I noticed something odd. Despite the distortions, most of the image appears quite smooth, with no ripping or tearing. This is because so far we have only ever used conformal operations in our function, so the function itself is conformal. However, notice that there are certain points in the panoramic maps that appear to be “pinched” where the amount of distortion seems to be greatest.
I decided to investigate further, and as I expected these “pinching” points correspond exactly with the roots of the derivative function. Why is this so? Consider a real valued function, whose derivative is the slope of the tangent line at each point. This tells us the instantaneous rate of change for each point. We can tell how fast the function is changing at each point, and whether that change is positive or negative.
The complex derivative is similar, but with more degrees of freedom. The absolute value, or magnitude, of our derivative tells us how much our function is changing; while the argument indicates the direction of change. You can think of our function as performing some sort of scaling and rotation to each point in space, which gives rise to the warping we see in our image. This idea is similar to the concept of divergence and curl from multivariable calculus, but the two should not be conflated.
So what does that mean for our “pinching” points? Well, when the derivative is zero the magnitude is also zero. That in itself isn’t a problem. A car can start moving and stop moving, all while maintaining fluid motion, so our image should remain smooth as well. But what about the rotation? When the derivative is zero, the argument is undefined. That means there is no way to tell which way the image should be turning when the derivative is zero. And that's why the image appears to be “pinched”.
This goes into some pretty deep stuff, and complex analysis is a fascinating topic! Many people who study it never truly gain an intuitive understanding of these concepts. I think, in toying around with these functions, I have accidentally stumbled upon a rather novel way to visualize these concepts directly. My work may not be as rigorous, but I hope that my insights will be of use to somebody. They have certainly helped me, as I continue to explore deeper into the beautiful world of mathematics.