Saltar al contenido Saltar a la navegación

Donny Ahumada tarea 5


TítuloDonny Ahumada tarea 5
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 5
AsignaturaTaller Inicial 1ª y 2ª Etapa,
Del CursoImagen Escrita 2012,
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)Donny Ahumada
ProfesorHerbert Spencer

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

void setup() {

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

}

void draw () {

 if (mousePressed)
 {
   one[y][0] = mouseX;
   one[y][1] = mouseY;
   one[y][2] = pmouseX;
   one[y][3] = pmouseY;
   y++;
 }
 for (int t=0; t<=y; t++)
 {
   strokeWeight(4);
   stroke(#66D5FC, 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]);
   }
 }

}