EXPLORABLES

# Keith Haring's Mexican Hat

This explorable illustrates one of the most basic pattern forming mechanism: Local excitation and long range inhibition. This mechanism or similar ones are responsible for patterns observed in neural tissue, animal fur and spatial heterogeneity in social systems.

This is how it works:

The state of the two dimensional system is defined by a state variable $u(x,t)$ at each position $x$ at time $t$. The state variable can have values in the range $[-1,1]$. Think of this as a degree of polarization, the ends of the interval corresponding to extreme values and $0$ to a neutral state.

At each location $x$ the rate of change of state is governed by the equation

[ \partial _t u(x,t) = - u(x,t) + H(x,t), ]

where the function $H(x,t)$ is the input that the system receives at location $x$. If $H(x,t)=0$ the state will go to the neutral state $u(x,t)=0$ due to the decay term. If $H(x,t)=H_0$ is a constant at $x$ then $u(x,t)\rightarrow H_0$.

#### The mexican hat:

Interesting things emerge, when the input $H(x,t)$ at location $x$ is determined by the state or polarization in the vicinity. We define two regions around $x$, a small disk $U_1(x)$ centered at $x$ with radius $R_1$ and an annulus $U_2(x)$ bounded by the radii $R_2>R_1$. We now integrate the state of the field and compute

[ I(x,t) = \int _{U_1(x)} dy\, u(y,t) -\int _{U _2(x)} dy\, u(y,t) ]

This means we weigh the average state within $U_1$ positively (local excitation) and the average in $U_2$ negatively (long range inhibition). Because of the shape of the interaction, this is also known as a mexican hat interaction. Finally, we use the raw input $I(x,t)$ and plug it into a sigmoid function to get

[ H(x,t) = \frac{1-e ^{-\beta\,I(x,t)}}{1+e ^{-\beta\,I(x,t)}} ]

This function makes sure that $u(x,t)$ is restricted to the interval $[-1,1]$. The parameter $\beta$ controls the shape (** steepness**) of the sigmoid response function. Initially, the system is in the uniform state 0 plus a little bit of noise.

When you press the play button, you start the dynamical system and will find that slowly the initially uniform state will evolved into a striped pattern with a typical wavelength. The overall shape and wavelength depends on the choice of parameters,
you can explore how changes of the ** radii** change the pattern.

The left arrow button resets initial conditions, the bottom right button resets the parameters.