> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://studio.sketchpad.cc/sp/pad/view/ro.ir18XCYpjhM/rev.24
 * 
 * authors: 
 *   Job van der Zwan

 * license (unless otherwise specified): 
 *   creative commons attribution-share alike 3.0 license.
 *   https://creativecommons.org/licenses/by-sa/3.0/ 
 */ 



float d, offset;

void setup(){
  size(600, 300, P2D);
  strokeCap(SQUARE);
}

void draw(){
background(16);

stroke(0,0,255,128);
strokeWeight(7);
d = 13;
offset = (frameCount%(d*2))/2;
for (int i = - 1 ; i <= width/d; ++i){
  line(i * d + offset, (height / 3) + 10, i * d + offset, (height * 2 /3) - 10);
  line(i * d + offset, (height * 2 /3) + 10, i * d + offset, height - 10);
}

stroke(255,0,0,128);
strokeWeight(5);
d = 11;
offset = (frameCount %(d*3))/3;
for (int i = - 1; i <= width/d; ++i){
  line(i * d + offset, 10, i * d + offset, (height/3) - 10);
  line(i * d + offset, (height * 2 /3) + 10, i * d + offset, height - 10);
}

}