Maquina de Dibujo, Carolina Olivares

De Casiopea


TítuloMaquina de Dibujo, Carolina Olivares, reloj de arena
Tipo de ProyectoProyecto de Taller
Palabras Clavetarea 4
Período2013-
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., 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)Carolina Olivares Rivera
ProfesorHerbert Spencer



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

void draw() {
  float t = dist(mouseX, mouseY, pmouseX, pmouseY);
  if (mousePressed) {
    espiral(mouseX, mouseY, t);
  }
}


void reloja(float x, float y) {
  pushMatrix();
  translate(x, y);
  beginShape(); 
  for (float i= 0;i < 20; i+=0.1) {

    curveVertex((i)*sin(i), (i*5)*cos(i));
  } 
  endShape(); 
  popMatrix();
}

void espiral(float x, float y, float tam) {
  pushMatrix();
  translate(x, y);
  beginShape(); 
  for (float i= 0;i < tam; i+=0.1) {

    curveVertex((i)*sin(i*5), (i)*cos(i));
  } 
  endShape(); 
  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 == ' ') {
    setup();
  }
}