Saltar al contenido Saltar a la navegación

Valeria Contreras: Programa de Dibujo Mejorado

Valeria Contreras: Programa de Dibujo Mejorado


TítuloValeria Contreras: Programa de Dibujo Mejorado
Tipo de ProyectoProyecto de Taller
Palabras Clavetarea 5
Período2012-
AsignaturaTaller Inicial Común 1ª y 2ª Etapa,
Del CursoImagen Escrita,
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)Valeria Contreras
ProfesorHerbert Spencer

float[][] coords; 
int maxPuntos; 
int p;

void setup() { 
  size(screen.width, screen.height); 
  p = 0; 
  maxPuntos = 10000; 
  coords = new float[maxPuntos][1000]; 
  strokeWeight(5); 
  background (#FFFFFF); 
  stroke (#000000);
}

void draw() { 
  saveFrame ("#####.jpg"); 
  if (mousePressed) { 
    coords[p][0] = mouseX; 
    coords[p][1] = mouseY; 
    println(p); 
    p ++;
  }

  for (int i = 10; i <= p; i++) { 
    point(coords[i][0], coords[i][1]);
  }
}

void connect() { 
  for (int i = 0; i < p; i++) { 
    for (int j = 0; j < i; j++) { 
      line(coords[i][0], coords[i][1], coords[j][0], coords[j][1]);
    }
  }
}

void keyPressed() {

  if (key == 's') {
    connect();
  }
  if (key == 'g'){
    saveFrame("img/######.jpg");
  }
}