Scott - E

By Scott
// A drawing tool that can draft random floor plans float c1 = 0; float c2 = 0; float c3 = 0; float c4 = 0; void setup () { size (400,400); frameRate(30); background(255); smooth(); noStroke(); } // random green rects when mouse is pressed void draw() { if (mousePressed == true) { c1 = random(-20, 40); c2 = random(-10, 40); fill (200, 255, 0); rect(mouseX,mouseY, c1, c2); // random grey rects when mouse is not pressed } else { c3 = random(-5, 20); c4 = random(-10, 20); fill (50); rect(mouseX,mouseY, c3, c4); } } // clear screen void keyPressed () { if (key == 'c' || key == 'C') { setup(); } }

2 Comments

  1. Posted October 16, 2008 at 10:28 am | Permalink

    This has a good range of control and chaos. Do you have ideas about how it could be extended?

  2. Scott
    Posted October 19, 2008 at 9:02 pm | Permalink

    i could perhaps account for the speed of the mouse…

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*