xxxxxxxxxx
/*-----------------------------
Gradient
Makes a gradient
02/09/2017
Austin DiLorenzo
dilorenzo.14@osu.edu
02/09/2017
Austin DiLorenzo
-----------------------------*/
void setup(){
size(1020,1020);
}
void draw(){
for(int i = width/2; i > 0; i = i - 4){
int x = i;
int y = i/2;
int z = 255 - i/2;
BLUE2(x, y, z);
BLUE(x,y,z)
RED(x,y,z)
RED2(x,y,z)
}
}
void BLUE2(int x, int y, int z){
fill(y,z,255);
noStroke();
rectMode(CENTER);
rect(width/4,height/4, x,height/2);
}
void BLUE(int x, int y, int z){
fill(z,y,255);
noStroke();
rectMode(CENTER);
rect(width/4+width/2,height/4, x,height/2);
}
void RED(int x, int y, int z){
fill(255,z,y);
noStroke();
rectMode(CENTER);
rect(width/4+width/2,height/4+height/2, x,height/2);
}
void RED2(int x, int y, int z){
fill(255,y,z);
noStroke();
rectMode(CENTER);
rect(width/4,height/4+height/2, x,height/2);
}