sábado, 11 de febrero de 2012

processing



color c = color(255);
float x = 0;
float y = 0;
float speed = 1;
void setup() {
  size(200,200);
}

void draw() {
  background(0);
  move();
  display(); 
  }  
void move() {
  x = x + speed;
  if (x > width) 
    x = 0;
  }
void display() {
  fill(c);
  rect(x,y,10,200);
}

void setup (){
size (800,400);
stroke (255);
background (198,32,188);
}
void draw (){
line (mouseX,mouseY,100,100);
stroke (3,2,2);
ellipse (mouseX,mouseY,80,80);
fill(233,237,14);
}




No hay comentarios:

Publicar un comentario