int starty,dirx,diry; int s=second();//return values from 0 to 59 int m=minute(); int h=hour(); void setup(){ size(200,200,P3D); s=59; m=59; h=23; starty=0; diry=1; dirx=1; } void draw(){ starty=starty+diry; s=s+dirx; dessineSucette(s,starty); changeDirection(s,starty); } void dessineSucette(int x,int y){ for(int i=0+s; i<59; i++) { fill(24*s,55,56); stroke(204, 202, 10); translate(10,10,10); stroke(204, 202, 10); line(x+s,y,x,y+s); stroke(204, 102, 10); line(x+m,y,x,y+m); stroke(24,0,0,10); line(x+h,y,x,y+h); } } void changeDirection(int x,int y){ if((y > height)||(y <0)) diry=-diry; if((x > width)||(x <0)) dirx=-dirx; }