Achulografo: Mei-Ling Oberli

| Título | Achulografo |
|---|---|
| Tipo de Proyecto | Proyecto de Curso |
| Palabras Clave | Tarea 6.- |
| Asignatura | Imagen Escrita arq 2013, |
| Del Curso | Imagen Escrita 2013 - ARQ, |
| Carreras | Arquitectura |
| Alumno(s) | Mei-Ling Oberli |
| Profesor | Herbert Spencer |
float tam;
void setup() {
size(500, 500); background(29573); stroke(200, 20);
}
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) * 30);
pushMatrix();
{
translate(x, y);
for (int i = 0; i < 100; i ++) {
float var = random(-200, 500);
stroke(1000 + var, -150 + var, +100 + var);
ellipse(random(+mag), random(+mag), random(+mag), random(+mag));
ellipse(random(+mag), random(+mag), random(+mag), random(+mag));
ellipse(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(10);
}
}