10 kinked lines

bloggif_542c6974451ce

Moving the mouse right, the line kinks and folds downward.


void setup () {
  size (600,400); 
  smooth ();
}

void draw () {
  
  background (100);
  strokeWeight (3);
  stroke (255);
  
  for (int i= 140; i <400; i+=25) {
    
    float mx = map (mouseX, 0, height, 150, 300);
    line (i, mx, i+40, 300);
    
    if (mouseY>150){
      for (int j=140; j<400; j+=25)
      
      line (j, mx, j+40, 150);
    }
    }
   
    }

Comments are closed.