260122
const W = 800;
const H = 800;
let palette = [];
function setup() {
createCanvas(W, H);
palette = colorArray[1].colors;
background(palette[3]);
}
function draw() {
background(palette[3]);
stroke(palette[4]);
strokeWeight(0.5);
noFill();
noiseSeed(1000);
let num = 80;
let level = 100;
let noiseScale = 0.01;
translate(W / 2, H / 2);
for (let i = 0; i < num; i++) {
for (let j = 0; j < num; j++) {
let x = map(i, 0, num - 1, -W / 2, W / 2);
let y = map(j, 0, num - 1, -H / 2, H / 2);
let xVert = x;
let yVert = y;
push();
beginShape();
for (let k = 0; k < level; k++) {
let angle = TAU * noise(xVert * noiseScale, yVert * noiseScale) * 3;
xVert += cos(angle);
yVert += sin(angle);
vertex(xVert, yVert);
}
endShape();
pop();
}
}
// noLoop();
}
const colorArray = [
{
id: 0,
colors: ['#253276', '#dfdad3', '#ffffff', '#000000'],
},
{
id: 1,
colors: [
'#9dbdba',
'#f8b042',
'#e47763',
'#253276',
'#dfdad3',
'#FFFFFF',
'#000000',
],
},
]; Day22:Pen plotter ready.
const W = 800;
const H = 800;
let palette = [];
function setup() {
createCanvas(W, H);
palette = colorArray[1].colors;
background(palette[3]);
}
function draw() {
background(palette[3]);
stroke(palette[4]);
strokeWeight(0.5);
noFill();
noiseSeed(1000);
let num = 80;
let level = 100;
let noiseScale = 0.01;
translate(W / 2, H / 2);
for (let i = 0; i < num; i++) {
for (let j = 0; j < num; j++) {
let x = map(i, 0, num - 1, -W / 2, W / 2);
let y = map(j, 0, num - 1, -H / 2, H / 2);
let xVert = x;
let yVert = y;
push();
beginShape();
for (let k = 0; k < level; k++) {
let angle = TAU * noise(xVert * noiseScale, yVert * noiseScale) * 3;
xVert += cos(angle);
yVert += sin(angle);
vertex(xVert, yVert);
}
endShape();
pop();
}
}
// noLoop();
}
const colorArray = [
{
id: 0,
colors: ['#253276', '#dfdad3', '#ffffff', '#000000'],
},
{
id: 1,
colors: [
'#9dbdba',
'#f8b042',
'#e47763',
'#253276',
'#dfdad3',
'#FFFFFF',
'#000000',
],
},
];