Home For Fiction – Blog

for thinking people


February 20, 2020

Book Worming Party: When Literature Meets Drawing

Home For Fiction, Programming

art, home for fiction, javascript, literature, programming

For the past couple of months I’ve been working on a rather ambitious project. Ambition is often misunderstood, but the way I choose to approach it, it’s about doing something “just because”. It was in this “fuck it” framework that Book Worming Party, my latest programming project came to being.

Book Worming Party – even the name should tell you how mad this project is – combines three of my interests: literature, visuality, and programming. What can I say, I’m a talented man (and above all, modest).

Book Worming Party is a program (written mostly in JavaScript) that takes a work of fiction and, based on calculations and interpretations it makes about its nature, turns it into semi-random visual art. It translates words into color, plot into shapes, genre into affect. There are no separate “kinds of art”; art is art.

book worming party
Here’s what Book Worming Party generated from Jane Austen’s Pride and Prejudice

Book? Worming? Party?

You’ve probably heard of house warming parties. You’ve also heard of book worms – I guess you might be one, if you’re interested in literature. But what the hell does Book Worming Party mean?

Life is chaotic, and so should be art – literature and drawing included. Book Worming Party is a celebration of art, an apotheosis of pastiche, a controlled madness that—like a wormhole—will take you to another reality.

Book Worming Party first analyzes the book (uploaded as a text file) and tries to interpret mood, style, genre, and other elements that affect what we understand as “a narrative”. It’s partly based on my Gothic and Science-Fiction analysis program, though of course significantly enhanced to encompass a much wider variety of texts.

From Literature to Drawing

After it reaches several conclusions about the text in question, the actual drawing begins. This part of the code mostly deploys the lovely P5.js library to draw semi-random compositions. They are semi-random because they are all based on predetermined patterns (that I have created), though at the same time randomized with partial input from the parameters supplied by the first part of the code.

This means that a text like Frankenstein will return an image more similar to Dracula than to, say, Lady Chatterley’s Lover. Of course, every now and then there are surprises – precisely because genre is a fluid concept.

Interested in a similar program which you can use yourself? Take a look at Text to Art!