Paul-Schotter

by ppm @ 8:18 pm 11 January 2011

Schotter clone à la Processing:

à la Processing.js:

and à la openFrameworks:

The openFrameworks version takes the random seed from the mouse position. Otherwise, the code is nearly identical for all three. The significant lines of code are:

float rot;
float tran;

translate(10, 10);

for(int col=0; col<12; col++) {
  rot = 0.0;
  tran = 0.0;
  translate(20, 0);

  pushMatrix();

  for(int row=0; row<24; row++) {
    translate(0, 20);
    pushMatrix();

    translate(random(-tran, tran), random(-tran, tran));
    rotate(random(-rot, rot));
    rect(-20, -20, 20, 20);

    popMatrix();

    rot += 0.03;
    tran += 0.03;
  }

  popMatrix();
}

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