first draft of fotomuseum visualisation

main
Rob Canning 2023-02-21 13:39:43 +01:00
parent 163cf23b7e
commit f0c53356e8
4 changed files with 2317 additions and 0 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,119 @@
Table table;
String p = "Bla";
Integer i;
TableRow row;
PFont liberation;
//liberation = loadFont("Noto Serif Tibetan ExtraLight");
//Noto Serif Tibetan ExtraLight
void setup() {
liberation = createFont("LiberationMono-Bold.ttf", 30);
table = loadTable("m1.csv", "header");
fullScreen();
//size(,620);
frameRate(1);
smooth();
}
Integer itteration = 0;
void draw() {
// rotate(HALF_PI);
// translate(0,-width);
//background(255);
i = frameCount % table.getRowCount();
if (i == 0) { itteration++; println(itteration); } else {};
itteration = itteration%4; // 4 items in sequence
if (itteration == 1){
background(155);
frameRate(30);
} else if (itteration == 2){
//background(155);
frameRate(15);
}
else if (itteration == 3){
background(155);
frameRate(30);
}
else {
//background(155);
frameRate(30);
}
if (i< table.getRowCount()) {
row = table.getRow(i);
p =row.getString("pro");
}
/////////////
if (i == table.getRowCount()/2 && i == table.getRowCount()/4 ){
fill(255,20,147);
textSize(random(60,150));
text(p,(random(width) - width/2), random(height));
}
if (i > table.getRowCount()/2){
fill(255);
textSize(random(12,24));
text(p,(random(width) - width/2), random(height));
}
if (i > table.getRowCount()/3){
fill(0);
if (itteration == 0){
textSize(random(22,34));
} else {
textSize(random(22,154));
}
text(p,(random(width)), random(height));
}
if (i > table.getRowCount()/4){
fill(255);
textSize(random(12,55));
text(p,(random(width)), random(height));
}
else {
fill(0);
if (itteration == 0){
textSize(random(22,34));
} else {
textSize(random(22,154));
}
text(p,(random(width) - width/4), random(height));
}
// DRAW ALPHA BACKGROUND RECT LOGIC
if ( itteration == 0 ){
fill(255,14); // white opacity
rect(0,0, width, height);
} else if ( itteration == 1 ) {
fill(155,155,155, 14);
rect(0,0, width, height); // itteration 2 no background redray
} else if ( itteration == 2 ) {
//fill(155,155,155, 14);
//rect(0,0, width, height); // itteration 2 no background redray
} else {
fill(155,155,155, 14); // gray opacity
rect(0,0, width, height);
}
}