// Animation built from parameter change // MAT 112 | Algorithmic Images // Uli Schmidts // based on code written by George Legrady // // int xx; void setup(){ //framerate(60); size(400,400); // define stage size xx = 100; // value that defines image detail } void loop(){ for (int y=0; y < 400; y++){ // vertical loop for (int x=0; x < 400; x++){ // horizontal loop float h = cos(PI * x / 400); // horizontal factor float v = cos(PI * y / 400); // vertical factor float c = sin(xx * sin(h + v)) * 100; // color value set(x,y,color(c,c,c)); // draw command } } xx = xx + 1; }