A series of generative books coded with basil.js.


A reinterpreation of Piet Mondrians work, where each page creates a random structure with random colors. As a little easteregg, there is a 1 in 100 chance of a Malevic "Black Square" appearing instead of a Mondrian.


During the lockdown I wrote a script that creates a random room with only one window for each page. It also randomizes three different daytimes.

Anatomy of a Typeface

This Script breaks down a font and uses the anchor Points to depict how each letter of the alphabet is constructed/drawn. The script I wrote can theoretically be fed any typeface.

A little Wizard X Harry Potter

This project was done together with Nicolas Zufferey. We combined machine learning, ml5js and basiljs by training a char-rnn model with Harry Potter texts and then feeding it the eBook »A little wizard« to complete it in the writing style of J.K.Rowling. The text output was then layouted in Indesign by a basiljs code using various inputs.



Interaction II - Coded Books

Basiljs is a javascript library developed by Ted Davis, Benedikt Gross and Ludwig Zeller used to do scripting and automation InDedign. We were introduced to it during Interaction II. Showcased here are 4 books/concepts I developed during the workshop as home assignments, each exploring something we learned on the day. All of it is pure code that executes actions in InDesign and puts out a book in .pdf format.

Student: Timo Rick
Lecturer: Ted Davis
Libraries/Tools used: basiljs/ml5js/RunwayML/InDesign

FHNW Academy of Arts and Design
BA Visuelle Kommunikation
Interaction II 2020