Javier Amador: 1000 lineas interactivo

De Casiopea




Título1000 lineas interactivo
Del CursoImagen Escrita 2017
2

<processingjs> float margin = 20; int m = 16; void setup() {

 size(500, 500);
 cursor(CROSS);
 stroke(0, 100);

}

void draw() {

 background(255); 
 int x=(mouseX-250)/18;
 for (int i=0; i<31; i++) {
   for (int j=0; j<31; j++) {
     line(i*m, (j+1)*m-((j/2)+x), (i+1)*m, j*m+((j/2))+x);
   }
 }

} </processingjs>

float margin = 20;
int m = 16;
void setup() {
  size(500, 500);
  cursor(CROSS);
  stroke(0, 100);
}

void draw() {
  background(255); 
  int x=(mouseX-250)/18;
  for (int i=0; i<31; i++) {
    for (int j=0; j<31; j++) {
      line(i*m, (j+1)*m-((j/2)+x), (i+1)*m, j*m+((j/2))+x);
    }
  }
}