Dear friends,
I am a starter in Processing. I hope you can help me with the following problem that I have... Thanks!
I would like to show the flickering (1 frame/sec) of the following two images generated using Processing.
How to do that?
I was able to generate the two images one by one using Processing. But how to put them together to show the two images alternating for 20 seconds? Can this be done in Processing Environment? Or I have to use Quicktime or other animation software to generate the pattern reversal?
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
size(480, 480);
background(0);
smooth();
noStroke();
for (int y = 0; y <= height; y += 80) {
for (int x = 0; x <= width; x += 80) {
fill(255, 255);
rect (x, y, 40, 40);
}
}
for (int y = 40; y <= height; y += 80) {
for (int x = 40; x <= width; x += 80) {
fill(255, 255);
rect (x, y, 40, 40);
}
}
size(480, 480);
background(255);
smooth();
noStroke();
for (int y = 0; y <= height; y += 80) {
for (int x = 0; x <= width; x += 80) {
fill(0);
rect (x, y, 40, 40);
}
}
for (int y = 40; y <= height; y += 80) {
for (int x = 40; x <= width; x += 80) {
fill(0);
rect (x, y, 40, 40);
}
}
1