Getting Started

I wrote this post to address a few common questions about generative art, including how to begin. While these topics could each fill a book, this is just a starting point.

What is generative art?

Generative art refers to art that is created by an algorithm, which is written by an artist and executed without human intervention.

My process involves writing R code with output that changes based on random variables each time it is run. I use the output image to guide my edits in an iterative process of executing the code, then editing the code. Sculpting clay may be a good metaphor because of the feedback between your eyes and your hands, slowly watching forms take shape and develop.

Generative artwork involves an effort to balance code that prioritizes 1) reliably beautiful and/or interesting output, and 2) variability in those high quality results (i.e., variations). Those technical goals commonly embody good generative artwork. I believe that another important aim for generative artwork is the vulnerable and authentic expression of an emotion or concept. Art should connect to the viewer and powerfully evokes their experiences and memories, whether it is amusing, clever, sad, or simply beautiful. A viewer may understand different things when they view art that is abstract, geometric, or even representational - but good art reverberates.

Why?

Our appreciation for artwork is enhanced by understanding what we see and how it was created. Perhaps as importantly, it can be truly enjoyable to use algorithms to create something with cultural value. When you write code that produces art, the algorithms can open possibilities beyond your imagination. Generative art requires the skill to experiment and control the form that the output can take, but also the judgment to provide enough freedom for the code to produce variable and interesting output.

How?

The question of how to learn to do this comes up frequently. My techniques benefitted from decades of coding practice, as well as reading generative art blogs and online tutorials. I learned much from experimenting without a particular lesson or goal in mind. Because I write my code art in the R Language, there aren't many resources to learn about generative art - compared to languages like p5js. I recommend a few p5js learning resources for beginners, which provides a glance at the rich world of free tutorials and information available online.

P5JS: a free & open-source JavaScript library for creative coding.

Coding Train: beginner creative coding tutorials and challenges.

thatcreativecode.page: visual overview of techniques and algorithms.

Reddit/Generative: supportive and active community.

Depending on your programming background, R can be a suitable choice for generative art. R is used primarily as a statistical analysis tool, which is where my experience is most extensive. If you have more practice in another language, there's no need to use R for art. That said, R has precise plotting functions, numerous packages to build more complex algorithms, and is extensively documented online (i.e. google-searchable). My first step learning to write algorithms for generative art in R was to experiment with plotting functions. Learning to suppress axes and margins, then precisely control the plot area, output image dimensions, and DPI resolution was fundamental to everything else that followed. My next steps involved experimenting with lines, points, and polygons, learning to develop color palettes, and using data arrays for more complex operations prior to plotting. Trigonometry was relearned.

R Studio: open-source code editing environment for R.

Back to blog