For decades, scientists have been trying to solve a tough question: if the Internet runs out of cat pictures, can we generate more using advanced mathematics?* A paper posted on the arxiv earlier this month by mathematicians Kathryn Lindsey and the late William Thurston calms fears about "peak cat." In the paper, they describe a method of approximating the outline of a cat or other object using the Julia sets of polynomials.

What’s a Julia set? Let’s start with an example. Consider the polynomial z2, where z is the complex variable x+iy. To determine the Julia set, we iterate the polynomial, meaning we plug in a number for z, get an answer, and plug that answer back in to the original polynomial. If we start with the number z=2, we get the sequence of numbers 4, 16, 256 and so on. This sequence grows boundlessly as we keep iterating. But if we start with the number 1/2, we get the sequence 1/4, 1/16, 1/256 and so on, getting closer and closer to 0.

In this way, we can divide the universe of possibilities for z into two camps: those that march off to infinity, and those that stay bounded. The filled Julia set of a polynomial is the set of values whose iterates stay bounded—in our example, 1/2 or 3/4 or 999/1000.

At the number 1, something changes. Anything less than one stays bounded, while anything greater than 1 rises to infinity. The number 1 is on the boundary of the filled Julia set. The boundary of any filled Julia set is the Julia set.

Yet let’s remember that z can be any complex number, formed from a real part and an imaginary part: x+iy. These complex numbers can be plotted on an ordinary graph, with the real part marked along the x axis and the imaginary part on the y axis. For our z2 example, then, the Julia set isn’t just the number 1—it’s a circle in the complex plane with a radius of one.

Lindsey and Thurston’s work deals with finding the polynomials whose Julia sets aren’t just boring old circles. They want to find the polynomials (of the general form a n zn +a n-1 zn-1+...+a 1 z+a 0 ) whose Julia sets form complex outlines—the shadow of a cat, perhaps. (The number n, the largest exponent of z, is called the degree of the polynomial. Our example of z2 had a degree of two.)

Julia sets for polynomials of degree two are well-understood, although they're often fractals rather than simple shapes such as circles. The story gets a lot more complicated as the degree increases because higher-degree polynomials are difficult to factor. (The much-maligned quadratic formula—the reason why we can easily discern the roots of degree two polynomials—is our friend!) A little bit is known about the possible shapes for Julia sets of degree 3 and 4 polynomials, but the shapes of the Julia sets of arbitrary polynomials are not yet understood.

Lindsey is a graduate student in mathematics at Cornell University. Her advisor is John Smillie, but Thurston was an unofficial second advisor, and it was his idea to start this research project. "I was sitting in his house, and he was staring off into space and asked, 'I wonder if Julia sets can be made into shapes,'" she says. Thurston had been working on understanding the Mandelbrot set better, and looking at the shapes of Julia sets was a related pursuit. The Mandelbrot set, one of the most famous fractals, is closely related to Julia sets of degree two polynomials: imagine the polynomial z2+c, where c can be any complex number. The number c is in the Mandelbrot set if 0 is in the filled Julia set of z2+c.

In their paper Lindsey and Thurston prove that for any simple closed curve in the complex plane—no matter how complicated—there is a polynomial whose Julia set is arbitrarily close to the outline of the curve. (A curve is called simple if it never intersects itself. You can think of simple closed curves as any way you can arrange a rubber band on a table without picking up any part of it.) In other words, says Lindsey, "if you have any shape that doesn't have holes or multiple pieces, it's just one blob, we can make a Julia set that looks very close to that." The cat picture at the top of this blog post is an approximation of the outline of a cat by the Julia set of a polynomial with degree 301.

Their work goes further: later in the paper, they show that you can approximate a pair of non-overlapping simple closed curves—imagine the inner and outer ring of a bulls-eye—by finding the polynomials for each curve and then combining them in a particular way. To illustrate, they approximated the shape of the famous Mandelbrot set as the outside curve and a heart as the inside curve.

Yet their work leaves a lot of open questions. "Can you make Julia sets that have more than one hole, or two separate pieces, each with holes, things like that," says Lindsey. In concrete cat terms, we can generate no-eyed cats and winking cats, but more research is needed to approximate cats with two open eyes or to draw multiple cats at once.

The adorable cat, butterfly and heart illustrations belie the depth of the mathematical connections in the paper. Not merely a recipe for cute pictures, the paper is an extension of Thurston and Dennis Sullivan's work connecting the behavior of iterations of rational functions in the complex plane to advanced topics in geometry. Lindsey says, "Both fields are looking at the long-term dynamics of something. As time goes to infinity, what happens?"

Lindsey and Thurston's paper is not the first use of cat pictures to illustrate mathematics. Arnold's cat map is a linear transformation applied over and over to a picture of a cat. The picture seems to get hopelessly stretched and jumbled up, but eventually Whiskers stares back at you, as good as new. Why cats? That is a question for psychology, not mathematics. But Lindsey says that her cat Magellan was the inspiration for the first picture in the paper. "Magellan spends a lot of time sitting on my papers when I'm trying to do math, so it felt appropriate."

*Not intended to be a factual statement. Scientists believe the sun will cool before humanity exhausts its supply of cat pictures.