# Chaos Games and Fractal Images

 Devaney presenting MAA Distinguished Lecture “Chaos Games and Fractal Images."

Robert Devaney did not divulge to the crowd that packed the MAA Carriage House on June 27 everything about the Chaos Game. What the Boston University professor revealed about this mathematical diversion, though, held his audience rapt for the entire lecture.

Devaney, currently serving as MAA’s president-elect, believes that mathematicians should ”get out there and communicate the beauty and accessibility of mathematics.” In his talk, “Chaos Games and Fractal Images,” Devaney practiced—expertly—what he preaches.

Slides and movies from this presentation are available here.

To play a basic version of the Chaos Game, start with the three vertices of an isosceles triangle: one red, one blue, and one green. Plot an initial point somewhere within the triangle, and then randomly choose one of the vertices, by rolling a six-sided die with two faces of each color, for example. Plot a second point halfway between the selected vertex and the initial point. Repeat the process, each time measuring the distance from the newly drawn point.

Using a computer simulation, Devaney showed that if you plot enough points, out of the seemingly haphazard smattering of dots the Sierpinski triangle takes shape.

This result is surprising, Devaney noted, on two counts: “You don’t get a random mess,” for one thing, and the image that emerges is a fractal.

“There’s all sorts of definitions of fractals,” Devaney said, “but probably the most important property of a fractal is that it’s a self-similar set.” Zoom in on one corner of the Sierpinski triangle, for instance, and the picture remains dizzyingly, disconcertingly unchanged, indefinitely.

There are variations on the Chaos Game, of course. The colored vertices needn’t demarcate an isosceles triangle, or a triangle of any sort. You can start with four vertices, or five, or 11. Neither must the so-called compression ratio—the factor by which the distance between the plotted point and the selected vertex is compressed—be two. By varying these parameters, Devaney demonstrated, it is possible to create a variety of arresting images.

Those pinwheels and snowflakes are not, however, as mysterious as they initially appear. “As long a you have a keen eye for geometry,” Devaney explained in reference to a fractal on one of his slides, “you can read off the rules of the Chaos Game that I played to produce that image.”

The possibility of back-engineering existing (or envisioned) imagery turns out to be key to applications of the mathematics behind the Chaos Game. All it takes to produce impressive animations, for example, is to allow rotation.

Devaney played a movie whose swirling, psychedelic action he had scripted with only a handful of numbers. He had specified the number of vertices, the compression ratio, the amount of rotation, and the number of times to iterate random selection of a vertex, but the computer had done the rest.

“That’s about eight bits of data that made that movie,” Devaney said. “That’s data compression in a big way.”

In the nineties, Hollywood took advantage of math’s power to convey information concisely. Imagine how the interstellar backdrop of an alien world should spin or quiver or vacillate, movie executives realized, and mathematics can make that motion happen.

“In the old days Disney would hire like 10,000 artists to sketch each frame,” Devaney explained. “Now they hire one student who knows linear algebra, probability, geometry, fractal geometry.”

Devaney has had students go on to work for Hollywood studios, but even amateur animations can astonish the viewer.

Robert Devaney presenting an MAA Distinguished Lecture in MAA Carriage House.

When he ran a “chaos club” in Boston’s inner city, Devaney challenged participants to make movies that not only were  beautiful but also defied his attempts to divine the parameters that had produced them. Devaney screened a couple of award winners for his Carriage House audience, eliciting oohs and aahs.

In one, the Sierpinski triangle slowly collapses down to a line. The animation’s creator, Devaney recalled, titled the work “Death of Sierpinski.”

Devaney chose the terser titles of “Wind” and “Droop” for the self-created animations he showed next. Using a set of rules involving rotation and differential squishing of a square, Devaney generated the iconic Barnsley fern.

“This is beautiful. This is interesting,” Devaney said. “This is exciting.”

No one disputed the speaker’s well-illustrated claims.

“This is mathematics,” he continued. “You gotta understand that.”—Katharine Merow

This MAA Distinguished Lecture was funded by the National Security Agency.