Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float x, y, var;
- float sz, r;
- int steps = 100;
- color c;
- color bg = #542437;
- void setup() {
- size(1000, 200);
- background(bg);
- var = 50;
- int a = 150;
- for (int i=0; i < steps; i ++) {
- r = random(1);
- var = (r > .7) ? width/2.4 : 50 ;
- r = random(1);
- c = (r > .8) ? #C02942 : #ECD078;
- fill(c, a);
- stroke(c, a);
- sz = random(4, 20);
- x = width/2 + random(-var, var);
- y = height/2 + random(-var, var);
- float twin = random(20, 50);
- line(width/2, height/2, x+twin, y+twin);
- line(width/2, height/2, x, y);
- ellipse(x, y, sz, sz);
- ellipse(x+twin, y+twin, sz, sz);
- }
- }
- void draw() {
- }
- void mouseClicked() {
- background(200);
- setup();
- }
- void keyPressed(){
- save(random(3467)+".jpg");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement