xxxxxxxxxx
/* minimal code basics | lumicon - holger lippmann - www.e-art.co */
/* XY grid 05 - distortion using noise rotation + size */
/////////////////////////// variables
int wid=10;
int hei=20;
int gap=5;
int numX = 500; // number of cols
int numY = 400; // number of rows
void setup() {
size(520,410);
smooth();
fill(255);
strokeWeight(0.1);
rectMode(CENTER);
noiseDetail(4, 0.6);
for (int x=0; x<width+gap; x += wid) {
for (int y=0; y<height+gap; y += hei) {
// float n = noise(x * 0.0007, y * 0.007, frameCount * 0.005);
float n = noise(x * 0.005, y * 0.005, frameCount * 0.05);
pushMatrix();
translate(x, y);
rotate(TWO_PI * n);
scale(10 * n, 20 * n);
rect(0, 0, 2, 2);
popMatrix();
}
}
}
//void mousePressed() {
// setup();
//}