Artwork with Linear Optimization
May 28, 2021
tags: art
![](/static/dividerdecorator-c9420a9fac07ae4a2a454236916e50cd.png)
Experiments with art and programming
In the 2018 Spring semester at Oberlin College, I took a class in linear optimization* under Bob Bosch. It was one of the best classes of my Oberlin career. As a final project for the class, Alex Jensen and I created a program that can take in any image and reproduce it with album covers (and other building blocks) under certain constraints. The more complicated properties took much harder to run, so most of artwork here is the result of just applying the right album cover to each block of the image according to its average RGB value. Enjoy!
- Linear optimization (also called linear programming) is a branch of mathematics concerned with optimizing a linear combination of variables subject to linear constraints. For example, you may wish to optimize 3x+4y subject to 0 ≤ x ≤ 10 and 0 ≤ y ≤ 10-x. If you impose that x and y are integers, you get a much harder integer programming problem.
Code located on Github.
Recreating Starry Night
![Original Starry Night, for reference. Starry Night (original)](/static/66f84b8e087640cff22fc92c0299a71a/29d31/original.jpg)
![Picture of Starry Night using only album covers. This artwork is pretty clear, and I like how the subject is immediately obvious, and it takes some time to realize that the image is really made out of album covers. Picture of Starry Night in album covers](/static/28ea3d9667588df81787b421d8bf55d6/29d31/albums_lowdef.jpg)
![This is a zoomed-in version of the above image. Here, it is clearer to see the individual album covers used to create the image. Zoomed in section of the previous image](/static/08da6325f80a37aed0d58aba759ddfd7/8c557/zoomedin.png)
![The same concept, but using flowers instead of album covers. Picture of Starry Night in flowers](/static/cd1f7ccc75074274c5e475cd4cabe1e4/29d31/flowers_lowdef.jpg)
![For this piece, we used tiles of specific solid colors. The different color scheme really changes the tone of the work, while keeping it very close to the original. Picture of Starry Night in solid tiles](/static/4584ab49daed9b76df72e98791c7d7a4/29d31/solids_lowdef.jpg)
![In this piece, we mandated that no two album covers could touch. Unfortunately, it didn't come out as immediately recognizable as the others, but I think it has its own character. Picture of Starry Night in album covers with no two tiles touching](/static/c532b8455b3af2e60a1f972591996fb3/29d31/notouch_lowdef.jpg)