Valentina Veliz, Tarea 6
Título | Valentina Veliz - Tarea 6 |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 6 |
Asignatura | Imagen Escrita 2012, |
Del Curso | Taller Inicial 1ª y 2ª Etapa, |
Carreras | Arquitectura |
Alumno(s) | Valentina Véliz |
Profesor | Herbert Spencer |
HLine h1 = new HLine(0, 1.0); HLine h2 = new HLine(100, 5.0); HLine h3 = new HLine(1.0, 0); HLine h4 = new HLine (5.0, 100);
void setup() { size(500, 500); background (#81C6E8); strokeWeight ( 0.8); stroke (#AAD7ED); smooth(); }
void draw() { if (h2.speed > 1.0) { h2.speed -= 0.01; } h1.update(); h2.update();
if (h3.speed > 3.0) { h3.speed -= 2.01
} h4.update(); h3.update(); }
class HLine { float ypos, speed; HLine (float y, float s) { ypos = y; speed = s; } void update() { ypos += speed; if (ypos > width) { ypos = 0; } line(0, ypos, height, speed); } }
void keyPressed () {
if (key=='3') {
stroke (#1EF5C1);
}
if (key=='4') { stroke (#36A4CE); } if (key=='5') { stroke(#FA9C05); } if (key=='6') { stroke(#8964DB); } if (key=='7') { stroke(#64DBDA); }
if (key=='8') { stroke(#DB6497); }
if (key=='9') { stroke(#F5EB1E); } }