Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to...
Transcript of Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to...
![Page 1: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/1.jpg)
Generative Art
Slides by Professor Dan Vogel.
Generative Art 1
![Page 2: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/2.jpg)
What is printed to the console on the 10th frame?
Generative Art 2
class Agent {int x;
Agent() {x = 0;
}
void update() {x = x + 1;
}}
Agent a = new Agent();
void draw() {a.update();println(a.x);
}
A. 0
B. 1
C. 9
D. 10
E. 11
![Page 3: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/3.jpg)
Jackson Pollock
Generative Art 3
![Page 4: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/4.jpg)
Generative Art 4
![Page 5: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/5.jpg)
Generative Art
Generative art refers to art that in whole or in part has been
created with the use of an autonomous system. An
autonomous system in this context is generally one that is non-
human and can independently determine features of an
artwork that would otherwise require decisions made directly by
the artist.
https://en.wikipedia.org/wiki/Generative_art
Generative Art 5
![Page 6: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/6.jpg)
Generative Art 6
How To Draw With Code: Casey Reashttps://youtu.be/_8DMEHxOLQE
![Page 7: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/7.jpg)
Generative Rules
1. start at random position with
random N, S, E, or W direction
2. each frame, decide if the line
should turn 90° clockwise
3. draw a line of random length in
current direction
4. if the line leaves the canvas, kill
it and start a new one
Generative Art 7
![Page 8: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/8.jpg)
1
2
3 4 5 6
7
8
9 10 11
1213
14
15
die
bornborn
Example of Generated Lines
Generative Art 8
frame
numbers
line left
canvas
new line is
“born” here
heading E
line is “born” here
heading N
![Page 9: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/9.jpg)
Lines are Drawn by an “Agent”
Generative Art 9
class Agent {float x;float y;// 0 is N, 1 is E, 2 is S, 3 is Wint direction;boolean dead;
Agent() {...
}
void update() {...
}}
way to keep
track of direction
![Page 10: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/10.jpg)
Lines are Drawn by an “Agent”
Generative Art 10
Agent a;
void setup() {...
// create agenta = new Agent();
}
void draw() {// update the agenta.update();
...}
![Page 11: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/11.jpg)
Generative Art 11
1. start at random position with
random N, S, E, or W direction
Agent() {x = random(width);y = random(height);direction = int(random(0, 4));dead = false;
}
0, 1, 2, or 3
![Page 12: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/12.jpg)
probability of
changing
direction
Generative Art 12
2. each frame, decide if the line
should turn 90° clockwise
void update() {...
// decide if it changes direction if (random(100) < probTurn) {
direction = (direction + 1) % 4; }
...modulo 4 wraps
direction back to
0
![Page 13: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/13.jpg)
Generative Art 13
3. draw a line of random length in
current direction
void update() { // save current positionint px = x;int py = y;
float step = random(1, maxStep);// step in the current directionif (direction == 0) {y -= step;
} else if (direction == 1) {x += step;
} else if (direction == 2) {y += step;
} else if (direction == 3) {x -= step;
}line(px, py, x, y);
change x or y
depending on
current direction
![Page 14: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/14.jpg)
Generative Art 14
4. if the line leaves the canvas, kill it …
void update() {...// kill if it leaves the canvasif (x < 0 || x > width || y < 0 || y > height) {
dead = true;}
… and start a new one
void draw() {...// create a new agent if this one diedif (a.dead) {
a = new Agent(); }
![Page 15: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/15.jpg)
generative1
Generative Art 15
start at random position with
random N, S, E, or W direction
each frame, decide if the line
should turn 90° clockwise
draw a line of random length in
current direction
if the line leaves the canvas,
kill it and start a new one
![Page 16: Generative Art - University of Waterloocs106/Winter... · Generative Art Generative art refers to art that in whole or in part has been created with the use of an autonomous system.](https://reader035.fdocuments.in/reader035/viewer/2022062508/608541c3422ea319445285fb/html5/thumbnails/16.jpg)
More Generative Art
Generative Art 16
Bohnacker, H., Gross, B., & Laub, J.
(2012). Generative Design: Visualize,
Program, and Create with Processing. http://www.generative-gestaltung.de/code
Pearson, M. (2011). Generative Art (1
edition). Shelter Island, NY : London:
Manning Publications.https://www.manning.com/books/generative-art