Rafael Galdames Cataldo: achurado
De Casiopea
Título | achuralógrafo |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 4 |
Período | 2013-2013 |
Asignatura | Imagen Escrita, |
Del Curso | Imagen Escrita 2013 - ARQ, |
Carreras | Arquitectura |
Alumno(s) | Rafael Galdames |
Profesor | Herbert Spencer |
float tam;
void setup() {
size(700, 700); background(25); stroke(68, 15);
}
void draw() {
tam = dist(mouseX, mouseY, pmouseX, pmouseY); if (mousePressed) { achurado(mouseX, mouseY, tam); }
}
void achurado(float x, float y, float mag) {
int num = round((mouseX/width) * 50); pushMatrix(); { translate(x, y); for (int i = 10; i < 46; i ++) { float var = random(-100, 640); stroke(50 + var, -79 + var, -20 + var); rect(random(-mag), random(-mag), random(-mag), random(-mag)); line(random(-mag), random(-mag), random(-mag), random(-mag));
}
}
popMatrix();
}
void keyPressed() {
String filename = "img/retrato-"+year()+"_"+month()+"_"+day()+"___"+hour()+"-"+minute()+"-"+second()+".png"; if (key == 's' || key == 'S') { saveFrame(filename); println("se ha grabado exitosamente el archivo "+filename); } if (key == ' ') { background(25); }
}