Friday, 3 August 2012

Final Code Project 1

Here is my final code for Project 1:


int x = 250;
int y = 250;

int h = 200;
int h2= 100;
int w = 1000;
int w2= 50;


void setup(){
 
size(500,500);
smooth();

background(255);
stroke(0);

   strokeWeight (1);
line (x,y,x,y-h);
line (x,y,x,y+h);
   strokeWeight (3);
line (x,y,x+w,y);
line (x,y,x-w,y);

   stroke(0);
   strokeWeight (4);
line (x,y,x-w2,y-h2);
line (x,y,x-w2,y+h2);
line (x,y,x+w2,y-h2);
line (x,y,x+w2,y+h2);

   stroke(0);
   strokeWeight (2);
line (x,y-h,x-w2,y-h2);
line (x,y-h,x+w2,y-h2);
line (x,y+h,x-w2,y+h2);
line (x,y+h,x+w2,y+h2);
   strokeWeight (4);
line (x-w,y,x-w2,y-h2);
line (x-w,y,x-w2,y+h2);
line (x+w,y,x+w2,y-h2);
line (x+w,y,x+w2,y+h2);



}


void draw(){}
void keyPressed(){
 save(selectOutput());
}




Variables that I have changed are strokeweight of lines, stroke opacity, and lengths of widths and height.

No comments:

Post a Comment