Monday, February 2, 2009

script: texture

processing:
a pattern study of texture.
each circle is connected via a thin transparent line which, through iteration, creates an additive visual grain. below is the result of 50k loops of this simple function.






























int xW = 3360;
int yH = 1050;

void setup(){
  background(150);
  size(xW,yH);
}

void draw(){
  
 // for (int i = 0; i <>
  
  //noLoop();
  int xRAN = int(random(0,xW));
  int xCIR = int(random(10,100));
  int xLEG = int(random(50,1200));
  int xLEG2 = int(random(50,1200));
  int rVAL = int(random(-8,8));
  
// drawINSTANCE (x-position, circle-radius, legnth)
  drawINSTANCE(xRAN, xCIR, xLEG, xLEG2, rVAL);
  
//  }
}

void drawINSTANCE(int xRAN, int xCIR, int xLEG, int LEG2, int rVAL)
{
//display settings

int R = int(random(100,255));
int G = int(random(100,255));
int B = int(random(100,255));

smooth();
stroke(0,20);
fill(255,90);


//end settings
  
  
//start
pushMatrix();
translate(xRAN,0);

line(0,0,0,xLEG);
ellipse(0,0,xCIR/8,xCIR/8);

pushMatrix();
translate(0,xLEG);
ellipse(0,0,xCIR/6,xCIR/6);

pushMatrix();
rotate(PI/rVAL);
line(0,0,0,xLEG);
translate(0,xLEG);
ellipse(0,0,xCIR/3,xCIR/3);

popMatrix();
popMatrix();
popMatrix();

    if((frameCount % 10000) == 0) {
    saveFrame("02test-########.tif");
    }
}

No comments:

Post a Comment