Achurado Camila Zamora
De Casiopea

| Título | Achurado Camila Zamora |
|---|---|
| Tipo de Proyecto | Proyecto de Curso |
| Palabras Clave | tarea 4 |
| Período | 2013- |
| Asignatura | Imagen Escrita, |
| Del Curso | Imagen Escrita 2013 - ARQ, |
| Carreras | Arquitectura |
| Alumno(s) | Camila Zamora |
| Profesor | Herbert Spencer |
float tam;
void setup() {
size(500, 500);
background(255);
stroke(51,242,15);
}
void draw() {
tam = dist(mouseX, mouseY, pmouseX, pmouseY);
if (mousePressed) {
achurado(mouseX, mouseY, tam);
}
}
void achurado(float x, float y, float mag) {
pushMatrix();
translate(x, y);
for (int i = 0; i < 80; i ++) {
line(random(-mag), random(-mag), random(-mag), random(-mag));
rect(random(mag), 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(255);
}
}
