Generative art experiment 3.5: Lord of the targets
January 30, 2012
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
void setup () { smooth(); size(500,900); render (); } void render () { fill (0, 0); background(255, 100, 0); for (int i = 0; i < random(50, 200); i++) { drawRings (); } } void drawRings () { float radius = random (20, width/1.4); float x = random (0, width); float y = random (0, height); for (int i = 0; i < radius; i++) { float w = random (50, 100); float redness = random (5, 200); for (int j = 0; j < w; j++) { stroke (redness, 0, 0, i); ellipse (x, y, i, i); i++; } } } void mouseClicked () { render(); } |