## A question for our listeners

We usually pose puzzles, which implies we know the answer ahead of time. But today I’m stumped, and have a real question I hope someone out there can answer.

It’s really quite amusing to repeatedly apply a series of effects to an image, say using Photoshop filters. I didn’t think about it until yesterday, but this is a great way to model various kinds of things, particularly certain partial differential equations.

To take a really simple example, we all know that heat diffuses, and that in the absence of any energy being pumped into a system, temperatures will tend to even out over time. Similarly, if we apply a blur to an image over and over again, soon we will have a smeared out gray.

Heat is modeled in a continuous realm: time is continuous, space is continuous. But while blurring, time occurs in discrete steps, and space is modeled in discrete pixels. Nonetheless, the two phenomena are closely related.

The famous heat equation is very simple:

du/dt ∝ Δu

All this means is that the amount of a quantity ‘u’ in a given location changes over time, and this change is proportional to how much net variation there is nearby– the more variation the more u will change. (For those with more than Cal III under your belt, no need to explain; if you’ve had Cal I, if we measure temperature along a rod, then this Δu works out to be just d^{2}u/dt^{2} and sure– the more concave up the function is, say, the faster the heat will increase at that spot, in an attempt to smooth out the temperature; if you haven’t had any calculus, or even if you have, it’s interesting to consider a discrete version of this:

Suppose we have a bunch of graph paper, with a temperature written in every cell. Then the new temperature at each new time can be modeled by taking a weighted average of the neighbors. For example, if we’re at X :

a b c

d X f

g h i

we might take an average using none of a,c,g and i, 1/8 of b,d,f,h and 1/2 of our original value X. (Generally we count closer spots more)

i.e. new value = X/2 + (b+d+f+h)/8

The change from the old value to the new value is —X/2 + (b+d+f+h)/8, and sure enough this is a discrete form of the laplacian.

We used photoshop to make the image at left , at the top of this post: we’ve applied a gaussian blur (rad = 1 px) and then three sharpens, and then repeated this over and over again.

And look!! Unmistakably, the spots and stripes that are the hallmarks of reaction diffusion types of equations have popped up!!

Reaction diffusion patterns pop up in many places– not least of which in the patterns of spots or stripes on many living things. The idea in reaction diffusion is that one or more quantities (like the amount of black in a pixel, or the amounts of various hormones or chemicals) simultaneously diffuse (blur) and react (changing the concentrations). These two actions are in a kind of tug-of-war, and when they are well-matched all kinds of interesting things can occur.

*Here’s my question (for experts only): that doesn’t make sense– aren’t both a gaussian blur and sharpening modeled by adding / subtracting a laplacian? And where is the reactive term?*

Incidentally, here’s another example that works beautifully:

If we repeatedly apply a gaussian blur and heighten the contrast, we obtain a sequence of images as below

This is exactly what we should expect: this is a discrete form of a well-known reaction diffusion equation in which the reactive force drives the interface between black and white towards having less and less total curvature.

—-

Incidentally, the discoverer of this class of equations was none other than the great Alan Turing, father of the theory of computation (and, as it happens, leader of the effort to crack the Nazi enigma code). I must take the opportunity to remind us all again that this great man was hounded to his suicide for his homosexuality by the very government he’d worked to save— a clear a martyr to the cause of universal human rights as there can be.