xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
p1 = createPointXY();
p2 = createPointXY();
}
let increment = 10;
function draw() {
for (let x1 = p1.x; x1 < windowWidth; x1 += increment) {
for (let x2 = p2.x; x2 < windowWidth; x2 += increment) {
stroke(255);
line(x1, p1.y, x2, p2.y);
}
}
}
function createPointXY() {
return {
x: random(windowWidth),
y: random(windowHeight)
}
}