Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup() {
- size(800, 1200);
- background(122);
- stroke(0);
- fill(255);
- strokeWeight(4);
- strokeJoin(ROUND);
- for (int i=0; i<50; i++) {
- fill(255);
- float x = random(width);
- float y = height;
- float x2 = x;
- float y2 = random(height/7, height);
- float x3 = x2 + random(20, 100);
- float y3 = y2 - random(20, 100);
- float x4 = x3;
- float y4 = y;
- quad(x, y, x2, y2, x3, y3, x4, y4);
- fill(200);
- x = x4;
- y = y4;
- x2 = x3;
- y2 = y3;
- x3 = x2 + random(20, 60);
- y3 = y2 + random(20, 60);
- x4 = x3;
- y4 = height;
- quad(x, y, x2, y2, x3, y3, x4, y4);
- }
- }
- void draw() {
- }
- void mouseClicked() {
- setup();
- }
- void keyPressed() {
- save(random(12345)+".png");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement