Skip to main content

The Mathematics of Opt Art

In his new book, Robert Bosch explains the optimization tools he uses to create intricate and playful images

Line art approximating portraits of William Rowan Hamilton, Lin-Manuel Miranda, and Linda Hamilton

Three Hamiltons (William Rowan, Lin-Manuel Miranda as Alexander, and Linda) appear as solutions to Traveling Salesman Problems.

Robert Bosch

This article was published in Scientific American’s former blog network and reflects the views of the author, not necessarily those of Scientific American


It’s no secret that constraints can help artists unlock their creativity. The Oulipo literary movement embraces constraints like writing a novel without the letter e; painter Piet Mondrian created iconic works of art using only primary colors within rectilinear black and white grids; 12-tone serialism in music, in which composers set strict rules for themselves about which notes can occur in which order in their work. In all of these endeavors, constraints helped artists find creative solutions to their artistic puzzles. In his recent book Opt Art, Robert Bosch describes the constraints he applies to the art he creates and the computational and mathematical tools with which he satisfies those constraints. 

Each chapter introduces an optimization problem—e.g. approximating images using particular tiles—and an accessible explanation of how to translate the problem into the language of mathematics and solve it using computational tools. 

Many of the examples in the book are mosaics made using different types of tiles. French priest and mathematician Sébastien Truchet appears in a portrait using modified Truchet tiles, and Barack Obama is made of 44 complete sets of double-9 dominoes. (As those examples indicate, his work is frequently playful.) 


On supporting science journalism

If you're enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.


None

Sebastian Truchet in Truchet tiles. Credit: Robert Bosch

Other pieces use the traveling salesman problem instances or knight’s tours to create line art. The traveling salesman problem is to find the shortest path between a given number of points or cities, and a knight’s tour is a path on a chessboard that visits every square exactly once using moves knights can make in chess. (I wrote about Bosch’s TSP art in 2015. It was my introduction to his work, and I’ve been a fan ever since.)

For many image types, the basic idea is to pixelate the image using a grid of the desired resolution and approximate each pixel with the type of tile you’re using. This technique makes the problems discrete, so, the tools to solve them come from the field of linear optimization. From a finite number of possible arrangements of tiles or lines connecting a group of points, can we find one that minimizes or maximizes particular quantities we have chosen?

While it’s fun to learn about the math and programming tools, I thought the most valuable thing about the book was the way Bosch gives us a peek into the more subjective side of his work: how he chooses what constraints to use with what media, and the different results that can happen when he makes different choices.

None

Barack Obama in dominoes. Credit: Robert Bosch

Opt Art is a fairly quick read, in part because it is so chock full of illustrations and in part because the mathematical techniques Bosch uses are at their core fairly simple. In some ways, the book is a tribute to the way the same few ideas from linear algebra can be applied to different problems to get a wide array of different results. (To be clear, this is not intended to trivialize Bosch’s work at all; I think there are an awful lot of important research projects that boil down to using the same few ideas from linear algebra to solve problems in different domains in engineering, math, and science!) 

Opt Art could be a good resource for an introductory course in linear optimization or for inspiration in a project-based linear algebra class. The writing is inviting, and Bosch gives motivated students and other readers the tools they will need to jump right in and start creating their own mosaics or other images using his ideas.

For those following along with my Math Reading Challenge, try this book for prompts 4 or 9. Very precocious babies can use it for prompt 2.