Labels

Monday, 26 March 2012

Code

This code was used to change my orginal form into 25 variables.

int j = 0;
int w = 100;// width of the squares
int h = 100;  // height of the squares
int x = 40; // x position
int y = 100; // y position
int s = 1;  //
int p = 0;  // width of the gaps between squares
int o = 0;  // 
int u = 0;  // chages y position each aquare
int q = 0;  //
void setup() {
  size(500,500);
    background(255);
    }

    void draw() {
      while (q<3) {
      while(s<3){
      while (j<0) {
        int i = 0;
       
        while (i<j+1) {
          rect(x+w*i+(w/2)*(3-j)+(s*p+o),y +j*h+(q*u*i), w, h);
            i=i+1;
         q=q+1;
         s=s+1;
        }
        j=j+1;
     
      }
      }
      }
    }
void mousePressed() {
  save("var43.jpeg");
  }

No comments:

Post a Comment