Ben Gotow-Schotter

by Ben Gotow @ 5:46 pm 11 January 2011

In Processing.js:

As a Java applet:

As code:

size(404,730);

int rows = 22;
int cols = 12;
int count = cols * rows;
int rect_width = 384 / cols;
int rect_height = rect_width;

smooth();
translate(10,10);
background(#ffffff);
noFill();

for (int ii = 0; ii < count; ii ++){ int origin_x = (ii%cols) * rect_width; int origin_y = floor(ii / cols) * rect_height; float randomness = ((float)ii / (float)count); float rand_rad = (random(2f) - 1f) * randomness * randomness; float rand_x = (random(8f) - 4f) * randomness * randomness; float rand_y = (random(8f) - 4f) * randomness * randomness; translate(origin_x, origin_y); rotate(rand_rad); rect(rand_x, rand_y, rect_width, rect_height); rotate(-rand_rad); translate(-origin_x, -origin_y); }

A video demonstrating it done in OpenFrameworks as well:

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