# General method to “naturally interpolate” to a complex map?

Given a region of the complex plane and a map $z \to f(z)$, is there a general way to "naturally interpolate" the point $z$ to $f(z)$ in such a way that the movement follows a "natural" smooth path that doesn't generate unnecessary "kinks" and overlaps?

Background: I make educational animations. A couple of projects I've been playing around with involve complex numbers. I'm trying to figure out a general method to animate complex maps that look good and natural in terms of smooth deformations of the complex plane.

Forgive me, but I have no way to confidently and formally state this question at this point. But I can illustrate it.

Here's a great video illustrating Möbius transformations. You can see that for the inversion, the points on the plane follow a quite natural path from start to finish. This follows naturally from the rotation of the sphere used in the projection, in this particular case.

But here's what a naive linear interpolation ($z \to (1-t) z + t f(z)$, with $0 \leq t \leq 1$) of the same transformation $z \to \frac{1}{z}$ looks like: As you can see, this method creates a lot of "kinks" and weird bends along the way. (Also, ignore the straight lines). I'm trying to avoid this, as it makes the animation more confusing than it should be.

Some other examples. Here's the same method for $z \to z^2$: And $z \to e^z$ (using $[-1,1] \times [-\pi,\pi]$): In all these cases, I can imagine different and more natural ways to deform along the way, but I haven't come up with a general way to tackle this problem yet. I'm hoping there's something in complex analysis that can be helpful here, but I haven't found anything yet. Any ideas?

EDIT: Here's $z \to e^z$ using Rahul's method with some translation: This is pretty much a perfect example of the sort of "natural" transformation I'm looking for. Each new step seems like an obvious deformation of the previous step following the same overall "style". It creates a nice sense of deliberation, which makes the movement intuitive, comprehensible and predictable.

• Note that there's also a Math Education Stack Exchange. Posting this question there as well might give you additional perspectives. – Semiclassical Jul 26 '14 at 15:31
• Have you considered animating it through stereographic projection in 3D? That might make it clear, since the Mobius transform is just a sequence of rotations and scalings of the sphere. – Emily Jul 29 '14 at 20:22
• If you look for a "more general" way to interpolate an operation between so to say: 0 times applied ... 1 time applied or in other words: "fractional iteration" then the use of Carleman-matrices might be of fundamental help: fractional iterates of an analytical function can sometimes be performed/approximated by fractional powers of a Carleman-matrix for the specific operation. Here the Carleman-matrix contains the coefficients of the power series of your function (and of its powers), and powers of the Carleman-matrix the coefficients of the iterates of the function. It's a ... – Gottfried Helms Jul 29 '14 at 20:31
• ...fairly general concept, but before I start explaining it you should make sure, that I've got your problem correctly at all. (If this is correct, then instead of "interpolation" a better tag would possibly be "dynamical systems" and "fractional iteration") – Gottfried Helms Jul 29 '14 at 20:32
• Hmm... Fractional iterations of a function might work, but could be a bit overkill. I'll try with something simple and see if it works first. I do mean interpolate in a sense, since what I'm trying to do is move the point $(a,b)$ corresponding to $z = a + bi$, to some point corresponding to $f(z)$. Using $w = (1-t)z + t f(z)$ is the linear interpolation I used above, which is the naive way. So the sophisticated approach is to change $f(z)$ itself in some clever way, and this is what I'm trying to do. I'm looking for a general and robust method to perform this to arbitrary functions. – LucasVB Jul 30 '14 at 1:27

Suppose $f$ is such that $f(0)=0$ and $f'(0)=1$. Then we can define $$f_t(z) = \begin{cases} z & \text{if t = 0,} \\ \frac1tf(tz) & \text{otherwise.} \end{cases}$$ One can verify that $\lim\limits_{t\to0}f_t={\rm id}$ and $f_1=f$, so $f_t$ interpolates between ${\rm id}$ and $f$. Furthermore, if $f$ is an analytic (or polynomial, or rational, etc.) function, then so is $f_t$.

For example, when $f(z)=e^z-1$, then $f_t(z)$ is also exponential: If $f$ does not satisfy the conditions $f(0)=0$ and $f'(0)=1$, we will transform it so that it does. Pick a point $z_0$ such that $f'(z_0)\ne 0$. Let $w_0=f(z_0)$ and $a=f'(z_0)$. Define a pair of rigid transformations \begin{align} u=\phi_0(z) &= a^{1/2}(z-z_0), \\ v=\phi_1(w) &= a^{-1/2}(w-w_0), \\ \end{align} and define $g$ so that this diagram commutes: $$\require{AMScd} \begin{CD} z @>{\phi_0}>> u \\ @V{f}VV @VV{g}V \\ w @>>{\phi_1}> v \end{CD}$$ One can verify that $g(0)=0$ and $g'(0)=1$. Thus, $g$ satisfies the conditions for interpolation as above. We can also construct a family of rigid transformations interpolating between $\phi_0$ and $\phi_1$, for example via $$\phi_t = a^{1/2-t}(\cdot-(1-t)z_0-tw_0).$$ Then we can interpolate $f$ by "slicing" the diagram a part of the way down, giving $$f_t = \phi_t^{-1}\circ g_t\circ\phi_0.$$

Here are some more examples.

$f(z)=1/z$ and $z_0=-i$: $f(z)=e^z$ with $z_0=0$: Sometimes it helps to insert other transformations before doing the interpolation. For example, $$\require{AMScd} \begin{CD} z @>{\log}>> @>{\phi_0}>> u \\ @V{f}VV @. @VV{g}V \\ w @>>{\log}> @>>{\phi_1}> v \end{CD}$$

$f(z)=z^2$ with $z_0=\log 1$ (this reduces to $f_t(z)=z^{2^t}$, not too far from the obvious $z^{1+t}$): • P.P.S. @LucasVB, I love your work. Very valuable stuff you're doing. – user856 Jul 29 '14 at 23:52
• This worked PERFECTLY for the exponential function by adding a translation as well. However, I haven't figure a good way to support the conditions given in a way that I can transform an arbitrary function to something that suits this method. I really need the final transformation to look exactly like $z^2$ or $1/z$. I'll study this in detail later. It does look quite promising. PS: Thanks for the answer and the compliment! :) – LucasVB Jul 30 '14 at 1:22
• If you do figure out a natural way to satisfy the conditions, please let me know. – LucasVB Jul 30 '14 at 1:38
• Amazing! These look exactly what I hoped! Thank you. – LucasVB Aug 3 '14 at 5:06
• @LucasVB: Take a look again. I had another idea. – user856 Aug 3 '14 at 6:35

I have also made some graphics like this where I needed some kind of interpolation. I often ended up trying to find a general formula that includes the initial case as well as the target as special cases where each just some parameters have to be changed. For example for the function $z \mapsto z^2$ The more general function would be $f_c(z) = z^c$ and for the interpolation I'd just try to 'slide' c from $1$ to $2$.

In the following example lets have a look at a moebius transformation $z \mapsto \frac{z}{2z+3}$ Here you have multiple choices of doing the transition. Now you can for example take $f_{a,b,c}(z) = \frac{z}{(az+b)^c}$ Here we can for example 'slide' $c$ from $0$ to $1$ with $a=2, b=3$ or slide simultaneausly $a$ from $0$ to $2$ and $b$ from $1$ to $3$ or combine both with the sliding of $c$.

For the example $z \mapsto e^z$ such a 'more general funciton' might look like this $z \mapsto az+be^z$ (which results in linear interpolation with the suggested method) but you can also try $z \mapsto z^a+e^{zb} -1$ etc.

It often takes some trial and error to find a 'the right way' but this seems to work for many examples. I often use then an additional variable $t$ that definides the sliding with $t=0$ for the initial state and $t=1$ for the target state and $t\in(0,1)$ for everything between, so then the function looks like this:

$$F_t(z) = f_{2t,2t+1,t}(z)$$

The use of this variable makes it easier to modify again the sliding action by replacing t by different functions that map $[0,1]$ to $[0,1]$ continuously with $0 \mapsto 0$ and $1 \mapsto 1$. You can easily make a list of different functions like this which you can try for then optimizing the transitions. E.g. $t \mapsto sin(t\pi)^c$,$t \mapsto t^c$,$t \mapsto -2t^3+3t^2$ and so on.

EDIT: We found still no satisfying solution, here the graphics of $z \mapsto \frac 1 z$ relating to the problem mentioned in the comments. • This is exactly what I'm already doing at the moment. It isn't enough. – LucasVB Jul 26 '14 at 18:10
• Well can you show us what your example looks like with what you tried up to now? All you showed here are only the plain linear interpolations. – flawr Jul 26 '14 at 20:34
• Well, first of all, changing the interpolating parameter doesn't make any difference at all, as it just tweens the animation for different rates. I already use better methods do deal with that. I've tried interpolating the real and imaginary parts with different rates too, but it would require tremendous amount of trial and error. It works OK with the Möbius inversion, but in general it doesn't and is not worth making GIFs of it. The problem is that I need a more general method. The bending produced by interpolating the exponent of $e^z$ did the trick for that case, but fails badly for $z^n$. – LucasVB Jul 28 '14 at 16:11
• What I was hoping for, I suppose, is some way to use the derivatives of the functions in some way, to figure out how to make the transitions naturally. If an intermediate step in the interpolation creates kinks, then the derivative will behave badly at those points and maybe knowing this would help me find a way to avoid the problem in general. The derivatives will tell how the map is curved, and this information seems useful in this case. I'm just not sure how to use it. – LucasVB Jul 28 '14 at 16:16
• I think this paper might help: ima.umn.edu/~arnold//papers/moebius.pdf One of the parameters listed in page 4 could be that rotation of the Rieman Sphere that makes up $z \mapsto \frac 1 z$ – flawr Jul 29 '14 at 13:21