Valeria Contreras: Programa de Dibujo Mejorado

| Título | Valeria Contreras: Programa de Dibujo Mejorado |
|---|---|
| Tipo de Proyecto | Proyecto de Taller |
| Palabras Clave | tarea 5 |
| Período | 2012- |
| Asignatura | Taller Inicial Común 1ª y 2ª Etapa, |
| Del Curso | Imagen Escrita, |
| Carreras | Diseñ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 |
| Profesor | Herbert 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");
}
}