3.Reloj Analógico

float x,y,angulo,R;
void setup(){
fullScreen();
background (0);
smooth();
x=width/2;
y=height/2-R;
angulo=0;
R=200;
}
void draw(){
noStroke();
fill(0,20);
rect (0,0,width,height);
stroke (255);
strokeWeight(10);
ellipseMode(CENTER);
strokeWeight(2);
fill (255,0,223,20);
ellipse (width/2,height/2,450,450);
point (width/2,height/2);
strokeWeight(2);
line (width/2,height/2,x,y);
x=width/2+R*cos(angulo);
y=height/2+R*sin(angulo);
angulo=angulo+0.005;
}

Comentarios