int x=0; int l; int s1; int minutos, horas; void setup() { size(500, 500); background(255); } void draw() { //rect(300, 10, 10, 10); int s = second(); // Values from 0 - 59 int m = minute(); // Values from 0 - 59 int h = hour(); // Values from 0 - 23 if (s1!=s) { float r1=random(0,255); float r2=random(0,255); float r3=random(0,255); // hours fill(100); stroke(150); for (horas=0; horas<24;horas++) rect(horas*20.833,10,30,90); fill(255); rect(h*20.833,10,21,90); //fill(189); //triangle(23.7*(h-1.5), 141,23.7*(h), 101,23.7*(h+1.5), 141); //rect(500-(s*8.15), 40, 20, 20); // mins fill(210); rect(5,200,490,30); for (minutos=0;minutos<61;minutos++) { if (minutos%5==0) { rect(5+minutos*8.15,200, 1, 20); } else rect(5+minutos*8.15,200, 1, 12); } fill(255); noStroke(); rect(0,158,499,41); fill(0); stroke(1); triangle(8.28*(m-4), 159,8.28*(m), 199,8.28*(m+4), 159); //for (minutos=0; minutos<500;minutos=minutos+8.15) //{ // fill(255); //rect(minutos,200,8.15,20); //} //fill(500-(m*8.15)); //rect(m*8.15,200,8.15,20); //rect(500-(m*8.15), 230, 20, 20); // segs fill(r1,r2,r3); if (s==0) { rect(0,300,20,200); fill(255); noStroke(); rect(8.15,299, 491.85,200); } else { stroke(1); rect(s*8.15,300,20,200); } //rect(500-(s*8.15), 430, 20, 20); s1=s; } //rect(s, 40, 20, 20); //rect(300, 10, s, 10); //hours //triangle(53, 200+(h), 83, 200+(h-9), 83, 200+(h+9)); //minutes //fill(0); // triangle(200+(m), 153,200+(m-9), 183,200+(m+9), 183); //seconds //triangle(253, 200+(s), 283, 200+(s-9), 283, 200+(s+9)); //triangle (200-s, 200+s, 300, 150-s, 400+s, 200+s); /* //hours noStroke(); colorMode(HSB,100); for(int i=0; i<50; i++) { for(int j=200; j<223; j++) { stroke(i, j, 100); point(i,j); } } */ /* //hours fill(23,132,20); rect(0,200,50,223); */ /* //minutes for(int i=100; i<150; i++) { for(int j=200; j<259; j++) { stroke(i, j, 100); point(i,j); } } */ /* //mins fill(100,132,110); rect(100,200,50,259); */ /* //seconds for(int i=200; i<250; i++) { for(int j=200; j<259; j++) { stroke(i, j, 100); point(i,j); } } */ /* //secs fill(123,132,156); rect(200,200,50,259); */ }