Week 3

by YUBING WANG
  • Show Sketch
/**@peep sketchcode */
 
int x=0;
int y=0;
 
void setup(){
 
size(512, 512);
frameRate(10);
colorMode(RGB);
}
 
void draw(){
 
for (int i = 0; i < width/2; i++) { 
  stroke(255, 255, i); 
  line(i, 0, i, height); 
}
 
for (int i=512; i >= width/2; i--) {
  stroke(512-i,255,255);
  line(i, 0, i, height);
}
 
 
  ellipse(100, 100+x, 80, 80); 
  stroke(255,255,0);
  strokeWeight(10);
  line(60, 100+x, 140, 100+x); 
 
 
  noStroke();
  fill(255,255,255);
  ellipse(412, 412-y, 80, 80); 
  stroke(0,255,255);
  strokeWeight(10);
  line(375, 412-y, 449, 412-y); 
 
x++;
y++;
}

Comments

Nobody has said anything yet.