3.Reloj analógico

float x,y,R,angulo;

void setup(){
  fullScreen();
  background(0);
  smooth();
  x=width/2;
  y=(height/2)-R;
  R=500;
  angulo=0;

}
void draw(){
  noStroke();
  fill(0,20);
 rect(0,0,width,height);
  stroke(255,0,150);
  strokeWeight(10);
  point(width/2,height/2);
  strokeWeight(5);
  line(width/2,height/2,x,y);
  x=width/2+R*cos(angulo);
  y=height/2+R*sin(angulo);
  angulo=angulo+0.005;
}

Comentarios

Entradas populares de este blog