xxxxxxxxxx
28
//horizontal lines
//Created by Mirette Dahab
//January 1st, 2025
//independant work as part of the genuary challenge
//Genuary day 1:
//Prompt: Vertical or horizontal lines only.
//4 in 1
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
for (let i = -5; i < width + 20; i += 19) {
for (let j = -5; j < height; j += 12) {
// let z = sin(frameCount * 0.01 + i * 0.05 + j * 0.05) * 10;
// let z = sin(frameCount * 0.1 + i * 0.05 + j * 0.05) * 10;
// let z = sin(frameCount * 0.1 + i * 0.5 + j * 0.05) * 10;
let z = sin(frameCount * 0.1 + i * 0.5 + j * 0.5) * 10;
strokeWeight(2 + z);
stroke(0);
line(i, j, i + 10 + z, j);
}
}
}