['#c1a5a9','#f08cae','#9a4c95','#4d2d52'],
['#b9ffb7','#abedc6','#98d9c2','#f19a3e'],
['#f4d06f','#ff8811','#9dd9d2','#fff8f0'],
['#c4e7d4','#c4dacf','#b9c0da','#998da0'],
['#272727','#2b50aa','#ff9fe5','#ffd4d4'],
['#e0f2e9','#ceb5a7','#a17c6b','#5b7b7a']
createCanvas(windowWidth, windowHeight);
simplex= new OpenSimplexNoise(Date.now())
hs = sqrt(3 * pow(hexSize, 2) / 4);
for (let x = 0; x <= width +hexSize ; x += 2*hs) {
for (let y = 0; y <= height + hexSize; y += 3 *hexSize) {
let r= floor(map(noise(x, y), 0, 1, 0, 8))
hexagon(x, y, hexSize, r)
r= floor(map(noise(x+hs, y), 0, 1, 0, 8))
hexagon(x+hs, y + 1.5 * hexSize, hexSize, r)
function hexagon(x, y, r, a){
narc(-hs, hexSize/2, hexSize*1.4, -PI/2, PI/6)
narc(0, -hexSize, hexSize*1.4, PI/6, PI-PI/6)
narc(hs, hexSize/2, hexSize*1.4, PI-PI/6, PI+PI/2)
narc(-hs, hexSize/2, hexSize*1.2, -PI/2, PI/6)
narc(0, -hexSize, hexSize*1.2, PI/6, PI-PI/6)
narc(hs, hexSize/2, hexSize*1.2, PI-PI/6, PI+PI/2)
narc(-hs, hexSize/2, hexSize, -PI/2, PI/6)
narc(0, -hexSize, hexSize,PI/6, PI-PI/6)
narc(hs, hexSize/2, hexSize, PI-PI/6, PI+PI/2)
narc(-hs, hexSize/2, hexSize*0.8, -PI/2, PI/6)
narc(0, -hexSize, hexSize*0.8, PI/6, PI-PI/6)
narc(hs, hexSize/2, hexSize*0.8, PI-PI/6, PI+PI/2)
narc(-hs, hexSize/2, hexSize*0.6, -PI/2, PI/6)
narc(0, -hexSize, hexSize*0.6, PI/6, PI-PI/6)
narc(hs, hexSize/2, hexSize*0.6, PI-PI/6, PI+PI/2)
function narc(x, y, d, start, stop){
for(let i= start; i<=stop; i+=PI/100){
let amount= map(Math.abs((start+h)-i), 0, h, d*0.68, 0)
let doff= map(simplex.noise4D(cos(i), sin(i), x+y, d/1000), -1, 1, -amount, amount)
curveVertex(cos(i)*(d/2+doff), sin(i)*(d/2+doff))