xxxxxxxxxx
48
let orange1;
let orange2;
let xoff = 0.002;
function setup() {
createCanvas(400, 400);
background(100);
strokeCap(SQUARE);
angleMode(DEGREES);
fill(255, 77, 0);
rect(0, 0, width, height);
for (let i = 0; i < width; i += 1) {
for (let j = 0; j < height; j += 1) {
// Scale input coordinates.
let nx = xoff * i;
let ny = xoff * j;
// Compute noise value.
let c = 255 * noise(nx, ny);
// Render.
stroke(c, c, c,220);
point(i, j);
}
}
drawDiagonals();
}
function draw() {
noLoop();
}
function drawDiagonals() {
noFill();
stroke(255);
let thickness = floor(random(40, 100));
strokeWeight(thickness);
let rotation = floor(random(25, 35));
rotate(rotation);
translate(random(90, 120), -200);
rect(0, 0, thickness * 1.5, 1000);
}