Monserrat Torres, Maquina de Dibujo

De Casiopea
Maquina de Dibujo


TítuloMaquina de Dibujo
Tipo de ProyectoProyecto de Taller
Palabras Clavetarea 4
Período2013-2013
AsignaturaImagen Escrita 2013 - DIS,
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.
Alumno(s)Monserrat Torres
ProfesorHerbert Spencer

void setup() {

  size(500, 500);
  background(255);
  noFill();
  stroke(0, 100);
}

void draw() {

  float s = dist(mouseX, mouseY, pmouseX, pmouseY);
  if (mousePressed) {
    dibujo(mouseX, mouseY);
  }
}

void dibujo(float x, float y) {

  pushMatrix();
  translate(x, y);
  beginShape(); 

  for (float a= 5;a < 10; a+=6) {

    rect(3, 2, 22, 22, 1, 3, 6, 9);
  }
  endShape(); 
  popMatrix();
}

void dibujo(float x, float y, float tam) {

  pushMatrix();
  translate(x, y);
  beginShape(); 

  for (float a= 2;a < tam; a+=3) {

    rect(6, 4, 44, 44, 2, 6, 12, 18);
  }

  endShape(); 
  popMatrix();
}

void keyPressed() {

  String filename = "img/retrato-"+year()+"."+month()+"."+day()+"-"+hour()+"-"+minute()+"."+second()+".png";
  if (key == 's' || key == 'S') {
    saveFrame(filename);
    println("Guardado"+filename);
  }
  if (key == ' ') {
    setup();
  }
}