Saturday, March 06, 2010
field01
int rows = 8;
int columns = 8;
int fields = rows * columns;
boolean colorUp = true;
int[] farbe = new int[fields];
void setup(){
size(800, 400);
}
void pixel() {
noStroke();
for (int j = columns-1; j >= 0; j = j-1) {
for (int i = rows-1; i >= 0; i = i-1) {
loadModus1();
fill(farbe[i]);
rect(width/columns*j, height/rows*i, width/columns, height/rows);
}
}
}
void loadModus1() {
for (int i = fields-1; i >= 0; i = i-1) {
if(farbe[i] >= 255) {
colorUp = false;
} else if(farbe[i] <= 0) {
colorUp = true;
}
if(colorUp == true) {
farbe[i] = farbe[i] + 10;
} else {
farbe[i] = farbe[i] - 10;
}
}
}
void draw(){
background(255);
pixel();
}
int columns = 8;
int fields = rows * columns;
boolean colorUp = true;
int[] farbe = new int[fields];
void setup(){
size(800, 400);
}
void pixel() {
noStroke();
for (int j = columns-1; j >= 0; j = j-1) {
for (int i = rows-1; i >= 0; i = i-1) {
loadModus1();
fill(farbe[i]);
rect(width/columns*j, height/rows*i, width/columns, height/rows);
}
}
}
void loadModus1() {
for (int i = fields-1; i >= 0; i = i-1) {
if(farbe[i] >= 255) {
colorUp = false;
} else if(farbe[i] <= 0) {
colorUp = true;
}
if(colorUp == true) {
farbe[i] = farbe[i] + 10;
} else {
farbe[i] = farbe[i] - 10;
}
}
}
void draw(){
background(255);
pixel();
}
comments
loading...
Add a comment: