Achuralógrofo
De Casiopea

| Título | Achuralógrofo Matías Cerda |
|---|---|
| Tipo de Proyecto | Proyecto de Curso |
| Palabras Clave | Tarea 4 |
| Asignatura | Imagen Escrita arq 2013, |
| Del Curso | Imagen Escrita, |
| Carreras | Arquitectura |
| Alumno(s) | Matías Cerda |
| Profesor | Herbert Spencer |
float tam;
void setup() {
size(700, 700); background(50);
}
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) * 20);
pushMatrix();
{
translate(x, y);
for (int i = 10; i < 60; i ++) {
float var = random(50, 100);
stroke(0 + var, 100 + var, 120 + var);
noFill();
rect(random(-mag), random(-mag ), random(-mag), random(-mag ));
line(random(-mag - 2), random(-mag - 2), random(-mag - 2), random(-mag - 2));
}
}
popMatrix();
} void keyPressed() {
String filename = "imagen "+day()+"_"+month()+"_"+year()+"_"+hour()+"-"+minute()+"-.png";
if (key == 's' || key == 'S') {
saveFrame(filename);
println("Guardado Correctamente "+filename);
}
if (key == ' ') {
background(50);
}
}