MadBek_SourceCode3

import processing.opengl.*;

float spacing; float rotation;

void setup { size (600, 1000, OPENGL); background (255); spacing=4; rotation=25; stroke (20, 100, 100, 80); }

void draw { background (255);

pushMatrix; translate (-1400, height-60, 100);

for (int j=0; j<50; j++) {

translate (20, 0, j*-1); //translate (90, -90, j*-1); // translate (180, -50, 0); pushMatrix;

for (int i=0; i<300; i++) { translate (spacing*1.5, 0, 0);

float step=TWO_PI/mouseX*10;

// stroke(255,0,0); //line (cos((frameCount+(i*10)+(j*8))*step)*rotation, sin((frameCount+(i*10)+(j*8))*step)*rotation, 0, 0);

pushMatrix;

if (j> random(50)) if (i==50)

{ // translate(cos((frameCount+(i*12)+(j*8))*step)*rotation, sin((frameCount+(i*12)+(j*8))*step)*rotation); // stroke(0,0,255); // box (75); }

popMatrix;

pushMatrix;

if(mouseButton == LEFT){ if (j>=mouseX && j<500) if (i>=mouseY && i<500)

{ //translate(cos((frameCount+(i*12)+(j*8))*step)*rotation, sin((frameCount+(i*12)+(j*8))*step)*rotation,50); //stroke(0,255,0); //box (50); } } popMatrix;

pushMatrix;

if (j==55+mouseX/15) if (i==74+mouseY/20)

{ translate(cos((frameCount+(i*12)+(j*8))*step)*rotation, sin((frameCount+(i*12)+(j*8))*step)*rotation,50); box (50); }

popMatrix; pushMatrix;

if (j==j+mouseX/1000) if (i==i+mouseY/1000)

{ translate(cos((frameCount+(i*12)+(j*8))*step)*rotation, sin((frameCount+(i*12)+(j*8))*step)*rotation); box (25); }

popMatrix;

}

popMatrix; } popMatrix;

pushMatrix; translate (-1400, height-60, 100);

for (int j=0; j<50; j++) {

//translate (20, 0, j*-1); translate (250, -120, j*-1); // translate (180, -50, 0); pushMatrix;

for (int i=0; i<300; i++) { translate (3, 0, 0);

float step=TWO_PI/mouseX*10;

// stroke(255,0,0); //line (cos((frameCount+(i*10)+(j*8))*step)*rotation, sin((frameCount+(i*10)+(j*8))*step)*rotation, 0, 0);

pushMatrix;

if (j> random(50)) if (i==50)

{ // translate(cos((frameCount+(i*12)+(j*8))*step)*rotation, sin((frameCount+(i*12)+(j*8))*step)*rotation); // stroke(0,0,255); // box (75); }

popMatrix;

pushMatrix;

if(mouseButton == LEFT){ if (j>=mouseX && j<800) if (i>=mouseY && i<500)

{ // translate(cos((frameCount+(i*12)+(j*8))*step)*rotation, sin((frameCount+(i*12)+(j*8))*step)*rotation,50); //stroke(0,255,0); //box (50); } } popMatrix;

/* pushMatrix;

if (j==55+mouseX/15) if (i==74+mouseY/20)

{ translate(cos((frameCount+(i*12)+(j*8))*step)*rotation, sin((frameCount+(i*12)+(j*8))*step)*rotation,50); box (50); }

popMatrix; pushMatrix;

if (j==j+mouseX/1000) if (i==i+mouseY/1000)

{ translate(cos((frameCount+(i*12)+(j*8))*step)*rotation, sin((frameCount+(i*12)+(j*8))*step)*rotation); box (25); }

popMatrix;

}

popMatrix; } popMatrix;

}

/////////////////////////////////////////////////////////////// void keyPressed{ if (key=='s'){ saveFrame("####.tga");// .tiff did not work }

}