xxxxxxxxxx
41
// based on illustration from form+code
let x = 10;
let y = 10;
function setup() {
createCanvas(400, 300);
background(1);
}
function draw() {
//background(30);
stroke(255,153,153);
let padding = [380, 280];
// grid of x's across screen
// for(x=10; x < width-padding; x+=10){
// for(y = 10; y < height-padding; y+= 10){
// line(x, y, x+10, y+10);
// line(x, y+10, x+10, y);
// }}
//
line(x, y, x+10, y+10);
line(x, y+10, x+10, y);
x += 10;
if(x > padding[0]){
x = 10;
y += 10;
}
if(y > padding[1]){
y = 10;
}
}