This Twitter Bot Automatically Generates Imaginary Moths
Image: Katie Rose Pipkin


This story is over 5 years old.

This Twitter Bot Automatically Generates Imaginary Moths


If you've ever looked into an entomology book, you'll notice the very iterative ways in which evolution fashions insects. When you break biology down to occasionally wild but mostly predictable, computer-like processes, it's easier to imagine a machine creating something that looks vaguely natural. That's what two visual artists, Katie Rose Pipkin and Loren Schmidt, ended up making: a program that procedurally generates moths and posts them on Twitter.


Pipkin is a professional artist and Schmidt is a game programmer, but both of them dabble in art generated through code. Pipkin generally codes programs that are compact, but create wildly variable art pieces, but this one had a couple more moving parts than usual.

The generator, written in Javascript, works by breaking down the moth into component parts: antennae, wings, veins, patterning and so forth.

"Each of these component parts follows a series of different rulesets that allows variation of process inside of their structures. Although the individual pieces do inform each other's generation, much of the individuality of each moth rises from the incredible amount of possibility contained in each anatomical part, and in their combination," Pipkin explained.

The generator then uses these parts to form some 50-100,000 strokes that make up the wings and body parts and veins.

In a way that process mirrors genetics: a scattershot, automated process that relies on a lot of moving parts and an occasional bit of reckless mutation design a functional living creature. The moths they generated come in single samples or groups of several. Zoomed out, they look like a digital analogue to something straight from a natural history museum, like so:

And while the generator isn't really generating totally accurate moths (check out how sharp some of the wings are), it's a grand act in exploring biology as an artistic exercise.

"I found myself revisiting old hand illustrated books about moths and butterflies frequently. Though our own moths are digital, the way they are constructed has more in keeping with a drawn moth than a photograph, and this was an important touchstone," Schmidt told me.

The core part of the project is done, but the two have plans to add additional functions to it. They are considering tweeting random moth facts or letting users "seed" their own moths by using text they tweet at the generator Twitter account to create new ones.

"We can effectively make a species for every word or sentence or phrase sent the bot's way. There will probably be a lot of 'make me a moth' moths," Pipkin said.