A streak of dark contamination runs vertically through virtual grains of sand.

FEATURES – Between the Sand Artwork

In ALL, FEATURES by McKenzie Prillaman

Interactive Science-Art Helps Visualize Underground Contamination

Pollution often conjures images of smokestacks rising into the sky or dirty water flowing down a stream. But what about the pollution beneath our feet—the contamination moving among particles of soil or between grains of sand?

Artist and software developer Owen Fernley brings this often unspoken underground contamination to life with his work Between the Sand. This online interactive artwork shows how gas moves between grains of sand below the surface. Once the viewer opens Between the Sand and clicks on the virtually generated sand grains on the screen, gaseous contamination begins to move through them. The movement of the gas through the sand follows the Invasion Percolation model, an algorithm used in environmental engineering research and known for following predetermined pathways. Therefore, this mesmerizing work serves as a valuable educational tool.

Between the Sand is the final creation from Fernley’s two-week-long Science Artist Residency, a program facilitated by the Canadian not-for-profit Art the Science. It is designed to immerse an artist in scientific research (Phase I), showcase the artwork inspired by the residency to the local community (Phase II), and share a globally available version of the work online via Art the Science’s digital Polyfield Gallery (Phase III).

Artist Owen Fernley and several members of Dr. Kevin Mumford's research group
Artist Owen Fernley and several members of Dr. Kevin Mumford’s research group. (From left to right: Matan Freedman, Owen Fernley, Nick Pease, Kevin Mumford, Caroline Wisheart, and Cole Van De Ven). Image: Julia Krolik

Phase I occurred March 19–30, 2018, when Fernley spent his days engrossed in the work of Dr. Kevin Mumford’s environmental engineering laboratory at Queen’s University. The research group studies the movement of liquids and gases in the porous underground. Specifically, the team investigates how hazardous chemicals move below the surface and how to remediate contaminated sites.

After entering the lab, Fernley quickly learned about the well-tested and extensively used Invasion Percolation algorithm. Some of the group’s research focused on exploring its limitations. “I had to drop my expectations; learning about this algorithm and some of the other modelling challenges the research group faced was even better than building an algorithm from scratch,” recalls Fernley. “For the first few days, I mainly tried to follow the breadth of research the group was working on. There was a lot to take in, and I became a student by necessity.”

After speaking with multiple researchers in the lab, one graduate student’s project caught his eye. Cole Van De Ven, now a postdoctoral fellow at the University of British Columbia, was conducting experiments to understand how a gas leak’s speed affects its movement underground.

The setup, which looks much like an ant farm, involved injecting gas into a thin layer of sand saturated with water and compressed between two glass plates. As the gas seeped through the space between the sand grains, intricate branching patterns emerged. “The experiments were visually beautiful, and I found myself genuinely interested in them,” Fernley says.

View from top of glass walled apparatus used in experiments. Sand bulges from the top.
Top of a freshly-packed sand column filled with water and awaiting an injection of gas. Image: Owen Fernley
Sand column used in Van De Ven's experiments on left. Image of branching pattern from gas in the sand column on right.
Sand column used in Cole Van De Ven’s experiments. Image: Cole Van De Ven | Raw image from the experiment reveals gas percolating through the sand column. Image: Cole Van De Ven

And thus, the seed for Between the Sand was planted in his mind.

By the end of his residency, Fernley decided to build a program that resembled Van De Ven’s experiments as closely as possible. Initially, he created a coded version of his observations by digitally replicating the sand’s colour and distribution within the glass-walled experiments. He first used circles to represent the sand grains, but he later swapped them out for actual images that he captured during the residency using the lab’s microscope.

Microscope view of sand grains
Microscope view of sand grains used in experiments. Image: Owen Fernley

“It wasn’t until I was playing with the positions of each sand grain that I noticed how the space between the grains shifted in fascinating new ways with every new arrangement,” Fernley says. As he rearranged the grains, new pathways between them emerged and old pathways disappeared. He realized that the empty space surrounding the grains was responsible for driving the contamination patterns he observed.

With this understanding in mind, Fernley began chasing the empty space between the sand. Although he could not replicate the complex physics of Van De Ven’s experiments, he dedicated himself to using creative coding as an approximation to better understand the Invasion Percolation algorithm.

Creative coding, according to Fernley, is “programming software for no other purpose than to program software.” Essentially, it’s experimenting in a digital setting. “As an analogy, take baking, not because you’re interested in making something people can eat, but because you’re interested in what might happen if you double the baking powder and add paprika,” Fernley explains. “The nice thing about software is you don’t have to throw out your failed experiments; you can just pick up wherever you last saved.”

Zoomed in image of digital sand grains
Screenshot of digital sand grains. Image: Owen Fernley

“I like to think of this project as ‘digital mimicry,’” Fernley says. “I wanted to recreate what it was like to see gas injected into a column of sand, continuously, and be able to just watch it, like a digital lava lamp…In a way, I resolved to make something both functional and functionless.”

To begin implementing the Invasion Percolation algorithm in the artwork, Fernley needed to map out the empty space between his digital sand grains to calculate how the contamination would flow through them. “The [Invasion Percolation] algorithm is very similar to a maze-solving algorithm, and needs a maze to solve,” he says. “Otherwise, it just expands evenly.”

Determining the empty space for the maze was no longer in the realm of creative coding; it required specific calculations. To do this, Fernley placed a grid of squares smaller than the sand grains under his digital display of sand. Imagine an expansive checkerboard with thousands of giant checkers spilled on top. He then measured the distances between the centre of each square and the centre of the nearest sand grain to determine which squares fell under the grains and which fell outside. The Invasion Percolation algorithm could now use the pathways between the grains’ positions as its maze to figure out where the contamination would travel.

“It’s never easy trying to make something complicated look smooth and unassuming,” Fernley admits.

Screenshot of digital sand grains overlaid on spaces on left. Same image on right but with sand grains removed to show pathways between the sand.
Screenshot of grains overlaid on spaces, which are removed (right) to show the pathways between the sand. Lighter shades are harder to invade. Image: Owen Fernley
Screenshot of dark contamination pattern following invadable spaces. View of squares and no sand grains.
Screenshot of Invasion Percolation algorithm following invadable spaces. Image: Owen Fernley

Art the Science’s pilot immersive residency program culminated in Between the Sand, a visually stunning work of creative coding. However, not only does this work please the eye; it also tells a valuable story about environmental contamination, making this interactive artwork a mesmerizing learning tool.

After launching Between the Sand, viewers can take control of their own journey through the contamination process. After initiating the artwork by clicking anywhere on the sand-filled screen, a dark pattern representing gas slowly permeates throughout the sand grains following the Invasion Percolation algorithm until all the space is filled. By clicking the “EXPLORE” tab in the upper left corner, viewers can access controls that influence the pattern’s speed and direction. Adjusting variables, including flow direction, pressure, and diffusion, shows viewers how these factors impact the contamination pattern in real time. These variables are just a few that the Mumford group takes into account in its research endeavours. Other settings are available to help viewers understand the inner workings of Between the Sand, such as seeing the measurements used to map the contamination pathways.

Screenshot of user interface panel on the web version of Between the Sand. All the controls are on the left and you can see a dark contamination pattern between the sand grains.
Screenshot of user interface panel (Phase III). Image: Owen Fernley

First showcased in 2019 as an exhibition at the Modern Fuel Artist-Run Centre for Phase II of the residency, the artwork initially engaged the local community in research undertaken by scientists within that community. Now, Fernley has developed a version of Between the Sand for Phase III—a digital form shared globally via Art the Science’s online Polyfield Gallery.

“I am hoping that anyone who sees the work will have the same sensation I had when I observed the experiment in real life, and in seeing this, appreciate how contamination moves underground,” Fernley says.

“In the end, I am hoping the work is relaxing and visually interesting, but also shows you a flow pattern that we don’t see in the open air or even under water.”

This is the second of two blog posts chronicling the Between the Sand Science Artist Residency.

For more by Owen Fernley, visit his website or Twitter.

Share this Post

About the Author
McKenzie Prillaman

McKenzie Prillaman

McKenzie is a fledgling science communicator working at the American Association for the Advancement of Science (AAAS). She has a background in neuroscience, and was a research assistant at the University of Virginia and a postbaccalaureate fellow at the National Institutes of Health. After years of thinking she’d become a neuroscience researcher, she discovered her passion for sharing science with others. That finding, in combination with her lifelong dabbling in the arts, led her to write for Art the Science's blog. In her free time, she can be found volunteering with the Smithsonian Associates studio arts classes, trying new foods, and wandering around her home of Washington, D.C. Twitter: @meprillaman