xxxxxxxxxx
203
let Mon = [0,0,0,0,0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,23,27,22,0,0],
Tue = [0,0,0,0,0,0,0,0,15,0,0,85,284,0,0,16,21,0,1,0,101,9,412,0],
Wed = [0,0,0,0,0,0,0,0,16,8,0,2262,2345,171,576,450,100,318,385,32,223,731,2102,8],
Thu = [32,16,0,0,0,0,0,0,9,0,8,0,0,0,0,0,167,368,27,104,0,49,11,0],
Fri = [9,0,0,0,0,0,0,0,0,37,26,881,1258,2180,197,37,0,0,1400,585,0,143,34,0],
Sat = [37,0,0,0,0,0,0,0,0,0,1905,1564,2085,4325,614,4529,3321,2459,2033,151,13,0,0,71],
Sun = [48,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0],
Hour = ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24'];
let w = 25;
let sizeUp = true;
function preload() {
fontA = loadFont('NotoSansMono-VariableFont_wdth,wght.ttf');
}
function setup() {
createCanvas(600, 600);
textFont(fontA);
textAlign(CENTER);
}
function draw() {
background(0);
stroke(255,150);
strokeWeight(20);
noFill();
angleMode(DEGREES);
translate(width/2,height/2);
Lines();
for(i=0; i<=23; i++){
rotate(15);
push();
stroke(255);
strokeWeight(1);
text(Hour[i],0,-280)
pop();
}
let Map = 1000;
for(i=0; i<=23; i++){
rotate(15);
let n = map(Mon[i],0,Map,0,150);
line(0,-100,0,-100-n);
}
for(i=0; i<=23; i++){
rotate(15);
let n = map(Tue[i],0,Map,0,150,true);
line(0,-100,0,-100-n);
}
for(i=0; i<=23; i++){
rotate(15);
let n = map(Wed[i],0,Map,0,150,true);
line(0,-100,0,-100-n);
}
for(i=0; i<=23; i++){
rotate(15);
let n = map(Thu[i],0,Map,0,150,true);
line(0,-100,0,-100-n);
}
for(i=0; i<=23; i++){
rotate(15);
let n = map(Fri[i],0,Map,0,150,true);
line(0,-100,0,-100-n);
}
for(i=0; i<=23; i++){
rotate(15);
let n = map(Sat[i],0,Map,0,150,true);
line(0,-100,0,-100-n);
}
for(i=0; i<=23; i++){
rotate(15);
let n = map(Sun[i],0,Map,0,150,true);
line(0,-100,0,-100-n);
}
}
function Lines(){
push();
//Animation
if(sizeUp == false) {
w = w - 0.5;
} else {
w = w + 1;
}
if(w == 45 && sizeUp == true) {
sizeUp = false;
} else if (w == 25 && sizeUp == false ){
sizeUp = true;
}
//Lines
let Map = 1000;
stroke(100,50);
for(i=0; i<=23; i++){
let n = map(Tue[i],0,Map,0,150,true);
strokeWeight(w);
//stroke(255, 127, 0, a);
circle(0,0,200+2*n);
}
for(i=0; i<=23; i++){
let n = map(Wed[i],0,Map,0,150,true);
strokeWeight(w);
//stroke(255, 255, 0, a);
circle(0,0,200+2*n);
}
for(i=0; i<=23; i++){
let n = map(Thu[i],0,Map,0,150,true);
strokeWeight(w);
//stroke(0, 255, 0, a);
circle(0,0,200+2*n);
}
for(i=0; i<=23; i++){
let n = map(Fri[i],0,Map,0,150,true);
strokeWeight(w);
//stroke( 0, 0, 255, a);
circle(0,0,200+2*n);
}
for(i=0; i<=23; i++){
let n = map(Sat[i],0,Map,0,150,true);
strokeWeight(w);
//stroke(75, 0, 130, a);
circle(0,0,200+2*n);
}
for(i=0; i<=23; i++){
let n = map(Sun[i],0,Map,0,150,true);
strokeWeight(w);
//stroke(148, 0, 211, a);
circle(0,0,200+2*n);
}
for(i=0; i<=23; i++){
let n = map(Mon[i],0,Map,0,150,true);
strokeWeight(w);
//stroke(255, 0 , 0, a);
circle(0,0,200+2*n);
}
pop();
}