Skip to content
Snippets Groups Projects
Commit 3832e2ec authored by Stefan Karner's avatar Stefan Karner
Browse files

Change formatting

parent d2d60359
No related branches found
No related tags found
No related merge requests found
......@@ -19,10 +19,9 @@ Just hook it up to whatever audio- or video- or whatever-generator, that eats OS
By default the patch sends OSC data (messages named "/height" + "/width")
back to your own machine (127.0.0.1 @ Port 12000).
*/
*/
float grid = 7;
int speed = 1000;
Table table;
......@@ -45,29 +44,25 @@ import oscP5.*;
import netP5.*;
int value;
OscP5 oscP5;
NetAddress myRemoteLocation;
void setup() {
size(1024, 768, P3D);
background(0);
oscP5 = new OscP5(this, 12000);
myRemoteLocation = new NetAddress("127.0.0.1", 12000); // change IP and port here if needed
frameRate(60);
rate = abs(int(sthmap+stwmap+2));
table = loadTable("anno_labs_pages_dropped_width_height_year.csv", "header");
}
void draw() {
step =abs(sin(frameCount*0.0001))*9;
counter=counter+int(step);
......@@ -77,12 +72,10 @@ void draw() {
}
background(0);
wmap = map(table.getInt(counter, 0), 1000, 5000, 0, 255 );
hmap = map(table.getInt(counter, 1), 1700, 4000, 0, 255 );
ymap = map(table.getInt(counter, 2), 1700, 1877, 0, 255 );
stwmap = map(table.getInt(counter, 0), 1000, 5000, 5, 1 );
sthmap = map(table.getInt(counter, 1), 1700, 4000, 5, 1 );
......@@ -92,7 +85,6 @@ sphH = map(table.getInt(counter,1),1700, 4000, 1, 10 );
for (int y=0; y < height-200; y +=0) {
for ( int x=0; x < width; x += 0) {
fill( int(random(wmap, 255)), int(random(0, hmap)), int(random(wmap, hmap)));
fill( int(random(0, wmap)), int(random(0, hmap)), int(random(wmap, hmap)));
noStroke();
rect(x, y, 20, 20);
......@@ -109,7 +101,6 @@ sphH = map(table.getInt(counter,1),1700, 4000, 1, 10 );
lines2();
popMatrix();
pushMatrix();
flick1();
flick2();
......@@ -128,7 +119,6 @@ sphH = map(table.getInt(counter,1),1700, 4000, 1, 10 );
fill(0);
rect(width/2, height-100, width, 200);
fill(255);
textAlign(CENTER, CENTER);
textSize(50);
......@@ -153,7 +143,6 @@ fill(0);
val = (table.getInt(counter, 0) *table.getInt(counter, 1))/10000;
noFill();
stroke(255);
......@@ -170,20 +159,14 @@ void sun() {
stroke(random(255), random(255), random(255));
strokeWeight(ymap/5);
ellipse(width/2, 284, (wmap+hmap)*0.9, (wmap+hmap)*0.9);
}
void flick1() {
noStroke();
if (frameCount % rate == 0) {
fill(255);
} else {
noFill();
}
//println(rate);
......@@ -191,36 +174,32 @@ fill(255);
rect(width/2, 426, width, 284);
}
void flick2() {
noStroke();
if (frameCount % rate == 0) {
fill(255);
} else {
noFill();
}
rectMode(CENTER);
rect(width/2, 142, width, 284);
}
void lines() {
stroke(0);
strokeWeight(grid);
for (int i = 0; i<height-190; i=i+10) {
line(0, i, width, i);
}
}
void lines2() {
stroke(0);
strokeWeight(grid);
for (int i = 0; i<width; i=i+10) {
line(i, 0, i, height-200);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment