Daniela reyes pizarra con objeto en movimiento

De Casiopea
Daniela reyes pizarra con objeto en movimiento


TítuloDaniela reyes pizarra con objeto en movimiento
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 6
AsignaturaTaller Inicial 1ª y 2ª Etapa,
Del CursoImagen Escrita 2012,
CarrerasArquitectura
Alumno(s)Daniela Reyes
ProfesorHerbert Spencer

//Construcción de pizarra con objeto en movimiento. Este aparecerá hacia abajo, hasta llegar al límite inferior y aparecer otra vez en el límite superior un poco más a la derecha. Al llegar al límite de la pizarra a la derecha, volverá a aparecer en la izquierda, y así sucesivamente.

color c = color(#FCFFFF); 
float x = 4; 
float y = 1;
float velocidad = 1;

void setup() { 
size(700, 500); 
}

void draw() {

 background(#FFD917);
 move();
 display();
}

void move() { x = x + velocidad; if (x > width) {

   x = 13;
 }
y = y + 7; if (y > width) { y = 0; } }

void display() {

fill(y);
rect(22,0, x, y); }