I am a beginner and am working on learning generative art and creative coding. this code aims at generating lines randomly and the number of iterations is random as well.
https://editor.p5js.org/rawrro/sketches/j4V6zpnMr
code:
function setup() {
createCanvas(windowWidth-20, windowHeight-20);
for (let i = random(100); i>0; i--);
{
line(random(0,600),random(0,600),random(0,600),random(0,600))
}
}
function draw() {
background(GRAY);
}