Caitlin Boyle:: Schotter
Schotter w/Processing.js
Processing w/plain old Processing
//Caitlin Rose Boyle
// January 10
// intart compdesign
//Schotter Reproduction
int squareSize = 30;
void setup()
{
size(((squareSize * 12) +60), ((squareSize * 24) + 60));
background (255, 255, 255);
noLoop();
noFill();
}
void draw()
{
drawSchotter();
}
void drawSchotter()
{
rectMode(CENTER);
int Counter = 0;
//loop rows
for (int y = 0; y < 24; y++){
//draw one row
for (int x = 0; x < 12; x++) {
//draw one square
pushMatrix();
translate(squareSize*x + random(Counter++)/100 + 30 , squareSize*y + random(Counter)/100 + 30);
rotate(PI*random(-Counter, Counter) / 1000);
rect(15, 15, squareSize, squareSize);
popMatrix();
}
}
}
Schotter in openFrameworks
[youtube clip_id="5WgBodZN8Qo" width=”635" height="501"]
//Caitlin Rose Boyle
// January 11
// intart compdesign
//Schotter Reproduction OF
int squareSize;
int square_counter;
int translatex;
int translatey;
int rot;
//--------------------------------------------------------------
void testApp::setup(){
square_counter = 0;
squareSize = 30;
ofBackground(255,255,255);
ofSetWindowTitle("Schotter Boyle");
ofNoFill();
ofSetColor(0x000000);
ofSetRectMode(OF_RECTMODE_CENTER);
ofEnableSmoothing();
ofSetFrameRate(60);
}
//--------------------------------------------------------------
void testApp::update(){
ofSeedRandom(1347);
square_counter = 0;
}
//--------------------------------------------------------------
void testApp::draw(){
// Loop over all columns
for (int y = 0; y < 24; y++) {
// Loop over all rows
for (int x = 0; x < 12; x++) {
ofPushMatrix();
// translate: offset random jitter border
ofTranslate(squareSize*x + ofRandom(0, square_counter)/10 + 30 , squareSize*y + ofRandom(0, square_counter)/10 + 30);
ofRotate(PI * ofRandom(-square_counter, square_counter)/30);
// Draw the square
ofRect(squareSize/2, squareSize/2, squareSize, squareSize);
ofPopMatrix();
square_counter++;
}
}
}