Susan Lin – Schotter

by susanlin @ 1:39 am 12 January 2011

Processing.js


Processing

Processing Code
After a few iterations, the working code ends up being 18 lines and optimized (to the best of my ability).

void setup()
{
  size(384, 674); //12x21 grid
  background(255);
  noFill();
  stroke(0);
 
  float variability=0; //important to use float over int!
  for(int j=0; j<672 ; j=j+32) {
    for(int i=0; i<384; i=i+32) {
      pushMatrix();
      translate(i+random(-variability, variability), j+random(-variability, variability));
      rotate(radians(random(-variability, variability)));
      rect(0, 0, 32, 32);
      variability+=0.083; //increases per square, this number is 1/12
      popMatrix();
    }
  }
}

openFrameworks

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2023 Interactive Art & Computational Design / Spring 2011 | powered by WordPress with Barecity