// Kevin Piunno // PS1 // Q7 int i = 0; boolean dir = true; void setup() { background(0); size(500,500); colorMode(HSB,360,100,100,100); } void draw() { stroke(i%360,map(i,0,1500,100,0),100,map(i,0,450,100,0)); strokeWeight(10); line(map(i,0,1500,0,width),0,width/2,map(i,0,100,0,height)*2); line(map(i,0,1500,0,width),0,map(i,0,100,0,width/2)*2,height); line(width-map(i,0,1500,0,width),0,width/2,map(i,0,100,0,height)*2); line(width-map(i,0,1500,0,width),0,width-map(i,0,100,0,width/2)*2,height); println(i + " " + i); if(dir) { i++; if(i > 500) dir = !dir; } else { i--; if(i < 5) dir = !dir; } }