Valentina Cornejo , tarea 5

De Casiopea
Revisión del 20:02 23 may 2012 de V.cornejo (discusión | contribs.)
(difs.) ← Revisión anterior | Revisión actual (difs.) | Revisión siguiente → (difs.)
Tarea 5


TítuloTarea 5
Tipo de ProyectoProyecto de Curso
Palabras ClaveTarea 5
Período2012-
AsignaturaImagen Escrita 2012
Del CursoTaller Inicial Común 1ª y 2ª Etapa,
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)Valentina Cornejo
ProfesorHerbert Spencer

float[][] one; int y=0;

void setup() {

 size (600, 600);
 one = new float [2000][4];
 background(#F8E0E6);

}

void draw () {

 if (mousePressed)
 {
   one[y][3] = mouseX;
   one[y][2] = mouseY;
   one[y][0] = pmouseX;
   one[y][1] = pmouseY;
   y++;
 }
 for (int t=0; t<=y; t++)
 {
   strokeWeight(4);
   stroke(#FA5882, 1);
   line(one[t][0], one[t][1], one[t][2], one[t][3]);
 } 
 if (y==1999)
 {
   hacer();
   noLoop();
 }

}


void keyPressed() {

 if (key == 'k' || key == 'K')
 {
   hacer();
 }

}

void hacer() {

 for (int u=0; u<=y; u=u+5)
 {
   for (int j=0; j<u; j=j+5)
   {
     line(one[j][0], one[j][1], one[u][0], one[u][1]);
   }
 }

}