Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int iter = 0;
- int x, y, step =0;
- int pix[][] = new int [10][10];
- void setup() {
- size(10, 10);
- background(0);
- colorMode(RGB, 2);
- frameRate(500);
- };
- void draw() {
- x=0;
- y=0;
- if (pix[x][y] > 1) {
- while (pix[x][y]>1) {
- if (y>=9) {
- pix[x][y]=0;
- y=0;
- x++;
- } else if(x<9){
- pix[x][y]=0;
- y++;
- }
- else {
- x=0;
- y=0;
- }
- }
- }
- pix[x][y]++;
- if(step > 3) {
- for (int i= 0; i<width; i++) {
- for (int j = 0; j<height; j++) {
- // translate(100, 100);
- set(i, j, color(pix[i][j]));
- }
- }
- step=0;
- }
- step++;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement