githubEdit

Coding art

Languages for programming art

A programming language is, after all, just another language. And a language can be spoken in many different ways, with a variety of accents or inflections. [...] But if a language isn’t capable of poetry, it has clearly lost its relevance on the human side of the equation. Matt Pearson

Processing

Processingarrow-up-right is a flexible software sketchbook and a language for learning how to code.

Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology.

In a surveyarrow-up-right, students in a college-level introductory computing course taught with Processing said they would be twice as likely to take another computer science class as the students in a class with a more traditional curriculum.

Processing was started by Ben Fry and Casey Reas in 2001. At that time, Fry and Reas were both graduate students at the MIT Media Lab within John Maeda's Aesthetics and Computation research group. Processing grew directly out of Maeda's Design By Numbers project, developed at the Media Lab and released in 1999. The full Processing story is told by Fry and Reas in this Medium article: A Modern Prometheusarrow-up-right.

Notably, the Processing approach has also been applied to electronics through the Wiringarrow-up-right and Arduinoarrow-up-right projects. Both projects (proudly) started at the Interaction Design Institute of Ivrea in Italy.

Coding example: Game of Life

The Game of Life is a cellular automaton developed by British mathematician John Conway in the late 1960s. Its purpose is to show how complex life-like behaviors can emerge from simple rules of interaction among many bodies.

The game takes place on an infinite grid of square boxes (cells) called the world according to the following rules:

  1. each cell has 8 neighbors, which are the cells adjacent to it, including those in a diagonal direction

  2. each cell can be in two states: alive or dead

  3. initially, the states of cells are randomly chosen

  4. the states of all cells at a given instant are used to calculate the state of the cells at the next instant. All cells in the world are updated simultaneously as they transition from one instant to the next

  5. The state transition rules depend solely on the number of living neighbors:

    1. a living cell with 2 or 3 living neighbors survives, otherwise it dies (due to isolation or overcrowding)

    2. a dead cell with exactly 3 living neighbors is reborn

chevron-rightPlay - Tweak Game of Lifehashtag

Create your personal version of GoL starting from the original code

Learn Processing

p5.ps

p5.jsarrow-up-right is a JavaScript library for creative coding, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else.

ps.js is an interpretation of Processing for today’s web. Using the metaphor of a sketch, p5.js has a full set of drawing functionality. However, you’re not limited to your drawing canvas. You can think of your whole browser page as your sketch, including HTML5 objects for text, input, video, webcam, and sound.

Coding example: Game of Life

Learn p5.js

chevron-rightPlay - Tweak Game of Lifehashtag

If your Processing tweaks were interesting, implement them in p5.js. Then fork the GoL codearrow-up-right on OpenProcessing and post your own version in p5.js.

R

Rarrow-up-right is a free software environment for statistical computing and graphics. R was not born to create art. However, it has been recently (ab)used in this sense, proving that even statistics is capable of poetry!

Typically, an artwork in R is generated as a plot - often a scatterplot - using ggplot2arrow-up-right library, which is a system for declaratively creating graphics: you provide the data, tell ggplot2 how to map variables to aesthetics, what graphical primitives to use, and it takes care of the details.

Coding example

A scatterplot artwork

chevron-rightPlay - Tweak in Rhashtag

Tweak the above R code altering the math functions and see what's the outcome.

Learn R (for generative art)

chevron-rightPlay - Make art with Rhashtag
  1. pick one function in aRtsy

  2. investigate how it works

  3. read the corresponding R code on GitHub

  4. generate some art with it

  5. post it on Telegram

chevron-rightPlay - Draw a portrait with Rhashtag
  1. read the Travelling Salesman Portrait projectarrow-up-right by Fronkonstin

  2. read the corresponding R codearrow-up-right

  3. generate a portrait of someone you love

  4. send it to your lover!

Last updated