Explorations in Generative Art

My journey from Markov to Canvas2D. From “Joy Division” to generative solar systems.

Note: This post originally appeared on Medium January 11, 2019

Folks that follow me for cool map things have probably been disappointed for the past few weeks. I used my vacation downtime (aka when the kids are sleeping) to fiddle with javascript-based generative art, and I tweeted about it incessantly.

For cartography, I love the intersection of data, software, and art. I’ve had occasional cause to dabble with code+cartography, but it has never quite been enough.

For generative art, it’s all code+art. It’s a great mix for me, and I’m always thrilled to be coding.

I’ve been excited by generative art for the past few years inspired by folks like @inconvergent@manoloidee, and @mattdesl.

Inspiration, in this case, led to action. I wanted to get in on the game.

Getting Started

My first stab at generative art was text-based. I used Markov strings to generate silly book titles, summaries, and authors using Library of Congress card catalog XML data as a data dictionary. It created silly things like this:

Killer Superbugs : the Story of Longitude. Arthur is looking forward to her classmates, while struggling with a relationship that may expose her and the outcome of the war. By Grace King and John R. St. John

That was great, but I wanted to make some pictures!

Generative Artistry

I began my journey to understanding and creating generative art sketches at Tim Holman’s generativeartistry.com. There, Tim has shared 8 (and counting) step-by-step tutorials that help you understand how to go about constructing a piece.

My take on the “Joy Division” tutorial

“Tiled Lines” tutorial

These helped me become more familiar with the patterns and practices of basic generative art. I was ready to strike out on my own!

canvas-sketch

The last piece I needed before starting out was a library that handled all of the fiddly bits of generative art. From live reloading to web server to file rendering, Matt DesLauriers’ canvas-sketch library was just the ticket to get me started. After one command, I had everything I needed to get started.

Sketch from Scratch

Inspired by a Present & Correct tweet, I thought it might be fun to generate random Christmas ornaments

https://twitter.com/presentcorrect/status/1069577119066411013/

Starting with a grid of circles, I randomly drew multiple arcs and filled them with random colors. That’s generative art!

The first output

It was a very fun exercise. You can follow the whole process on my tweet thread here. Here is the GitHub repository.

The final design

Eventually, I switched gears and started sketching christmas trees.

Random christmas trees

Spacey Sketch

I do a fair bit of Pinterest browsing for inspiration, and one day I came across a nice simple graphic of a solar system. I thought this could make a great generative sketch!

The inspiration pin. Source

I went through a ton of iterations that you can see on this Twitter thread:


Sample Outputs