I made a simple clock program. Left column displays hours, the middle column, the seconds and the right one, the minutes. I've a problem whith this program. I can not make the ellipses of the hours, minutes, seconds, and the lines disappear every second, minute or hour that passes.
Can anyone help me?
Code:float ysegundos,yhoras,yminutos;
void setup () {
size (350,700);
background (0);
for (int i=0;i<=24;i++) {
fill (#00039B);
rect (65,yhoras,8,5);
yhoras=yhoras+30;
}
for (int i=0;i<=60;i++) {
fill (#00039B);
rect (168,ysegundos,9,3);
ysegundos=ysegundos+11.5;
}
for (int i=0;i<=60;i++) {
fill (#00039B);
rect (270,yminutos,8,5);
yminutos=yminutos+11.5;
}
}
void draw (){
fill (255);
ellipse (162,second()*11.72,7,12);
ellipse (184,second()*11.72,7,12);
stroke(255);
line (1,350,59,hour()*26.17);
line (80,hour()*26.17,161,second()*11.72);
line(184,second()*11.72,263,minute()*11.8);
ellipse (263,minute()*11.8,7,12);
ellipse (286,minute()*11.8,7,12);
line (350,350,286,minute()*11.8);
ellipse (80,hour()*26.17,7,12);
ellipse (59,hour()*26.17,7,12);
}
Thank you in advance.