Introduction to Generative Art with Processing

36
Introduction to Generative Art with Processing creative tech

Transcript of Introduction to Generative Art with Processing

Page 1: Introduction to Generative Art with Processing

Introduction to Generative Art with Processing

creative tech

Page 2: Introduction to Generative Art with Processing

What is Processing?

Open Source Programming Language

Made specifically for Visual Designers

Java Application, simplified syntax

Developed at MIT Media Labs by Casey Reas and Benjamin Fry in 2001

Page 3: Introduction to Generative Art with Processing
Page 4: Introduction to Generative Art with Processing

Learn Processing

Processing:A Programming Handbook for Visual Designers and Artists, 2nd Edition

by Casey Reas and Ben Fry

Getting Started with Processing

(O’Reilly)

by Casey Reas and Ben Fry

Generative Art: A practical guide using processing

by Matt Pearson

Page 5: Introduction to Generative Art with Processing

Learn Processing

The Nature of Code: Simulating Natural Systems with Processing

by Daniel Shiffman

Page 6: Introduction to Generative Art with Processing

http://processing.org

Page 7: Introduction to Generative Art with Processing

Diverse Outputs

Stills

Animations

Image Manipulation

Performance Art

Page 8: Introduction to Generative Art with Processing
Page 9: Introduction to Generative Art with Processing
Page 10: Introduction to Generative Art with Processing
Page 11: Introduction to Generative Art with Processing
Page 12: Introduction to Generative Art with Processing
Page 13: Introduction to Generative Art with Processing
Page 14: Introduction to Generative Art with Processing
Page 15: Introduction to Generative Art with Processing
Page 16: Introduction to Generative Art with Processing
Page 17: Introduction to Generative Art with Processing
Page 18: Introduction to Generative Art with Processing
Page 19: Introduction to Generative Art with Processing

Now we will make some art

Page 20: Introduction to Generative Art with Processing

Installation

processing.org/download/?processing

Version 2.2.1

Unzip

Open It

Page 21: Introduction to Generative Art with Processing
Page 22: Introduction to Generative Art with Processing

Hello, World

Page 23: Introduction to Generative Art with Processing

void setup() {

}

void draw() {

}

Try running it, by clicking on the play button in the top left

Page 24: Introduction to Generative Art with Processing

void setup() {

size(600,600);

background(#000000)

}

void draw() {

}

Try running it. You should now have a bigger black box

Page 25: Introduction to Generative Art with Processing

void setup() {

size(600,600);

background(#000000);

}

void draw() {

ellipse(100, 100, 50, 50);

fill(#FF4067);

}

"Hello, world” in the form of a pink circle

Page 26: Introduction to Generative Art with Processing

Important: we are working in a coordinate space

100

100

600

600

Page 27: Introduction to Generative Art with Processing

...

ellipse(100, 100, 50, 50);

...

Page 28: Introduction to Generative Art with Processing

void setup() {

size(600,600);

background(#000000);

}

void draw() {

for (int i=100; i<600; i=i+100) {

ellipse( i, 100, 50, 50);

fill(#FF4067);

}

}

Now that we know it’s a grid, we can exploit that and make our art cooler. Do this by looping over the x-coordinate.

Page 29: Introduction to Generative Art with Processing

void setup() {

size(600,600);

background(#000000);

}

void draw() {

for (int i=100; i<600; i=i+100) {

ellipse( i, 100, 50, 50);

fill(#FF4067);

}

for (int i=100; i<600; i=i+100) {

ellipse (100, i, 50, 50);

fill(#FF4067);

}

}

Page 30: Introduction to Generative Art with Processing

Loop?

This means that we do something to a variable in our function repeatedly, for however many times we tell it to do it.

for (int i=100; i<600; i=i+100) {

ellipse(i, 100, 50, 50);

}

initial value

when to stop

interval

The program generates: ellipse(100, 100, 50, 50), ellipse(200, 100, 50, 50), ellipse(300, 100, 50, 50), ellipse(400, 100, 50, 50), ellipse(500, 100, 50, 50)

Page 31: Introduction to Generative Art with Processing
Page 32: Introduction to Generative Art with Processing

void setup() {

size(600,600);

background(#000000);

}

void draw() {

for (int i=100; i<600; i=i+100) {

for (int j=100; j<600; j=j+100) {

ellipse( i, j, 50, 50);

fill(#FF4067);

}

}

}

Page 33: Introduction to Generative Art with Processing

void setup() {

size(600,600);

background(#000000);

}

void draw() {

for (int i=100; i<600; i=i+100) {

for (int j=100; j<600; j=j+100) {

ellipse( i, j, 50, 50);

fill(#FF4067);

}

}

}

MouseX, MouseY

Page 34: Introduction to Generative Art with Processing
Page 35: Introduction to Generative Art with Processing

Branding with data

Page 36: Introduction to Generative Art with Processing

Questions?