Consuelo Miranda tarea 4
De Casiopea
Título | Tarea 4 |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 4 |
Período | 2012- |
Asignatura | Taller Inicial 1ª y 2ª Etapa, |
Del Curso | Imagen Escrita 2012, |
Carreras | Arquitectura |
Alumno(s) | Consuelo Miranda |
Profesor | Herbert Spencer |
float[][] coords; int numDots = 1000 ; float c = 0.1999; color c1 = color(128, 128, 128); void setup() { size(700, 700); coords = new float[numDots][2]; for (int i = 0; i < 800;i++) { coords[i][0] = random(width); coords[i][1] = random(height); smooth(); background(666666); } } void draw() { for (int i = 0; i < 200; i++) { int next = (i+1) % 200; float difx = coords[i][0] - coords[next][0]; float dify = coords[i][1] - coords[next][1]; float nx = coords[i][0] -= difx * c+1; float ny = coords[i][1] -= dify * c; stroke(50, 80); stroke(c1); line(coords[i][0], coords[i][1], nx, ny); } } void keyPressed() { // si presiono 'a' dibuja en burdeo if (key == 'a') { c1=color(#c60051); stroke(c1); } // si presiono 's' dibuja en amarillo if (key == 's') { c1=color(#ffff00); stroke(c1); } // si presiono 'd' dibuja en calipso if (key == 'd') { c1=color(#16cce1); stroke(c1); } // si presiono 'f' dibuja en blanco if (key == 'f') { c1=color(#ffffff); stroke(c1); } if (key == ' ') { // si preciono ESPACIO pongo un velo blanco sobre el dibujo noStroke (); fill(30, 10); rect(90, width, height, 450); stroke(20, 40); } }