I wrote code to generate a large computational wallpaper that covered the front of the Compton Gallery for the Interconnectivity: Seeing in No Time exhibit!
Work for a Member organization and need a Member Portal account? Register here with your official email address.
I wrote code to generate a large computational wallpaper that covered the front of the Compton Gallery for the Interconnectivity: Seeing in No Time exhibit!
For my thesis research, I’ve been thinking about how people create from observation. A beautiful example is the work of Santiago Ramón y Cajal, who documented the nervous systems through staining and illustrating neurons. The illustrations are gorgeous on their own.
So when the Vision in Art and Neuroscience class final show was happening, and the idea of illustrating the cells of the retina on the front of the gallery gained traction, I was excited to engage with the work! I would computationally create a design that they printed on vinyl and wrapped around a 25' long and 7' high window (~8m x 2m).
Besides creating from observation, the pieces touches on a few other areas of interest, like using patterns to take advantage of trivial repetition and drawing organic shapes. I only had around two weeks to pull it together, but luckily I was prepared!
The system produces the vector graphics needed for the printing. I also played with other ways to lay out the wallpaper.
The first step is to create the cell types for the retina, which are the famous rods and cones, and also the amacrine, horizontal, bipolar, and ganglion. This brings up something on my mind: an interesting thing about natural objects is that a group of things shares attributes that make it part of the group (e.g., the “cone” cells), while still having unique traits to make it an individual (e.g., the number of connections it has to other cells…). To be honest, the “group” definition is always arbitrary: every year, organizations update bird species lists as they learn more about which birds are actually the same species or different.
There are parallels to how we write code! When coding, I create abstractions where I group things with similar responsibilities into the same code, like something that could create “cone” cells. But I want to be able to use that code to produce many individual cone cells, each of which might have a different number of connections. So I make the “cone” cell function more flexible so I can vary the number of connections. I need to balance being able to create a lot of variations while still being recognizably an instance of its kind. Once again, “group” is totally arbitrary: I could have a function for “cones”, many functions for cells, one function to create any kind of cell, and so on!In any case, now it’s easy to create any number of cone cells.
But I find once I've written the code to generate cells, creating many variations of an individual thing… gets old. Computation often means that once you create the thing, you can trivially create a lot of the thing. I often think of Kate Compton and the 10,000 bowls of oatmeal problem:
"I can easily generate 10,000 bowls of plain oatmeal, with each oat being in a different position and different orientation, and mathematically speaking they will all be completely unique. But the user will likely just see a lot of oatmeal." (link)
But also, I needed to cover 7 x 25 feet, so I needed a lot of cells, and they might not all look interesting on their own. There are a few directions to go here (Kate Compton describes some in the blog), but for me, a big source of inspiration is the long history of using repetition in beautiful things like textiles, rugs, and architecture.
I have much to learn from them: how they can look organic while actually repeating, how the repetitions can look more than the sum of their parts, and how the piece can feel more like rhythm than repetition. So! The challenge I set out was to create a truthful diagram of the retina, but use artistic license to lay it out like wallpaper to try to make use of patterns.
Cells have a body-shape and a cap-type. The body shape is a sequence of thicknesses and tangent strengths. The caps are either flat, round, a point with one connection, or a connector with multiple connections. That gave me enough options to make all of the thick parts of the cells. Those could then be connected: the base of the rod connects to their ball, and then to the little top part.
I schemed a fair bit about how the paths of axons should look. I’ve done other projects with wires that I thought this could draw from. In the end, one of my first tests turned out fine: I randomly built a tree of axons, and then snapped to specific y-values so they fall into little tracts.
(My PI is very good at creating organic blob shapes, so I have learned from those!)
I have learned to love the Bézier curve. I avoided Bézier for a long time because I liked the look of lines and arcs. But connecting two points with lines and arcs is a computational geometry headache (though Dubin paths can help). Also, I found an arc going into a line can sometimes look jarring, even if it’s tangent (I think it has to do with the sudden change in curvature?)
So Bézier curves were a great way to make things both organic and precise, which is what I needed. First, given a pair of location+direction combinations, I can draw a cubic Bezier that connects the points and is tangent to their direction. For this piece, I made all of the tangents vertical or horizontal. That simplifies the code and also stylizes the result!
I didn't use it in this piece, but there are also tricks to making Bézier curves look closer to arcs, for example by placing control points using hobby curves.
Since I started talking about how cool wallpaper is, I can talk about what I used to position cells on the wall. Often, I draw grids and vary parameters, but it's usually all the same base type.
In this case, I not only varied parameters, but I also varied the cell type being shown. I could write code like: if(i % 3 == 0, horizontal, bipolar_start) to alternate between horizontal and bipolar cells.
I'm happy with how fast this came together and how it connected many ideas I've been exploring. You can stop by the exhibit and check it out, and my classmate's work!