Daniela reyes pizarra con objeto en movimiento
De Casiopea
Título | Daniela reyes pizarra con objeto en movimiento |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 6 |
Asignatura | Taller Inicial 1ª y 2ª Etapa, |
Del Curso | Imagen Escrita 2012, |
Carreras | Arquitectura |
Alumno(s) | Daniela Reyes |
Profesor | Herbert 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); }