SHOWING: First 60
//No Recursion by Lemonhaze
//Use this p5js code to generate the artwork by yourself via https://editor.p5js.org/ or other preferred method.
// Set canvas size
let canvasWidth = 800;
let canvasHeight = 800;
let x = 0;
let y = 0;
let spacing = 8;
let colors = [
[255, 209, 220], // Pastel Pink
[203, 255, 181], // Pastel Green
[203, 230, 255], // Pastel Blue
[255, 245, 154], // Pastel Yellow
[245, 154, 255], // Pastel Purple
[154, 235, 255] // Pastel Aqua
];
let colorIndices = [0, 2, 2];
let seed = 0;
function setup() {
createCanvas(canvasWidth, canvasHeight);
background(0);
stroke(255);
randomSeed(seed); // Set the random seed
}
function draw() {
// Draw a line at the current position
strokeWeight(2);
let currentColorIndex = colorIndices[floor(random(colorIndices.length))];
let currentColor = colors[currentColorIndex];
stroke(currentColor[0], currentColor[1], currentColor[2]);
if (random(1) < 0.5) {
line(x, y, x + spacing, y + spacing);
} else {
line(x, y + spacing, x + spacing, y);
}
// Move to the next position
x += spacing;
// Reset x and move to the next row
if (x > width) {
x = 0;
y += spacing;
}
// Reset y and stop the pattern once the canvas is filled
if (y > height) {
noLoop();
}
}
function windowResized() {
resizeCanvas(windowWidth, windowHeight);
background(0);
}
//No Recursion by Lemonhaze#18,282,112text