Maria Jesus Oliva: Achurado

De Casiopea
Achuralógrafo


TítuloAchuralógrafo
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 4
Período2013-
AsignaturaImagen Escrita,
Del CursoImagen Escrita 2013 - DIS,
CarrerasDiseño Gráfico"Diseño Gráfico" is not in the list (Arquitectura, Diseño, Magíster, Otra) of allowed values for the "Carreras Relacionadas" property., Diseño Industrial"Diseño Industrial" is not in the list (Arquitectura, Diseño, Magíster, Otra) of allowed values for the "Carreras Relacionadas" property.
Alumno(s)Maria Jesus Oliva Palma
ProfesorHerbert Spencer


float tam;

void setup() {
  size(500, 500);
  background(229,194, 14);
  fill(81,7,121);
}

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) * 80);
  
  pushMatrix();
  {
  translate(x, y);
  for (int i = 0; i < 20; i ++) {
    
    float var = random(50, 250);
    
    stroke(700 + var, -209 + var, -70 + var);
    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 == '-') { //Apretar - para guardar una img
    saveFrame(filename);
    println("se ha grabado exitosamente el archivo "+filename);
  }
  if (key == '*') { //Apretar * para borrar todo
    background(255);
  }
  
}