Lecture 03: Processing (I)

A quick introduction to the Processing toolkit.

Processing is a programming environment made for artists, by artists. Here is a helpful book. We will be using two different flavors of Processing: Java and JavaScript. (They are very similar, but there are a few small differences.)

Visiting the Processing web site:

We will also be using P5.JS, the JavaScript flavor of Processing:

An overview of the Processing environment.

  • Running examples
  • Your sketchbook
  • An overview of the environment [Java]

A lightning-fast introduction to Processing code.

  • overall structure: setup() and draw().
  • setting up the canvas: size() [Java] or createCanvas[JS]
  • drawing primitives: line(), ellipse(), rect().
  • graphics state: strokeWeight(), stroke(), fill(), smooth().
  • color, transparency.
  • time: millis(), frameCount()
  • interaction: mousePressed(), mouseX, keyPressed()
  • graphic transformations: translate(), scale(), pushMatrix(), etc.
  • mathematics: random(), map(), noise()