int i; void setup(){ size(300,300); } void loop(){ stroke(255-i,0,255); rect(20,i,10,i); rect(50,i,10,i); rect(100,i,10,i); i += 1; stroke(255,255-i,0); rect(i,0,i,300); i += 1; if(i>300){ i=0; } }