xxxxxxxxxx
let colors=["#e9d0b5","#a67b25","#421519","#4f707b","#b39e47","#183d3c","#4b6648","#92471d","#173a24","#5c1913"]
function preload(){
font= loadFont('FamiljenGrotesk-VariableFont_wght.ttf')
}
function setup() {
createCanvas(400, 400);
background('#f4f1de')
strokeCap(PROJECT)
let weaveSize=60
let gridSize= weaveSize*0.8
noFill()
colorChooser=floor(random(colors.length))
for(let x=60; x<=400; x+=gridSize*0.9){
for(let y=60; y<=400; y+=gridSize*0.9){
weave(x, y, weaveSize)
}
}
fill('#f4f1de')
noStroke()
rect(0, 0, width, 60)
rect(0, 0, 60, height)
rect(340, 0, 60, height)
rect(0, 340, width, 60)
noFill()
stroke(100)
textFont(font)
fill(100)
strokeWeight(1)
stroke(100)
text('1.9', 20, 380)
}
function weave(x, y, s){
let qs= s*0.25
let ts= s/10
let hs= s*0.5
//let ts= s*0.33
strokeWeight(s*0.1)
push()
translate(x, y)
//noFill()
strokeWeight(s*0.1)
stroke(colors[colorChooser%colors.length])
colorChooser++
arc(-ts, -ts, hs, hs, PI, PI+HALF_PI)
stroke(colors[colorChooser%colors.length])
colorChooser++
arc(ts, ts, hs, hs, 0, HALF_PI)
//sw
stroke(colors[colorChooser%colors.length])
colorChooser++
arc(-qs, qs, hs, hs, PI+HALF_PI, TAU)
//ne
stroke(colors[colorChooser%colors.length])
colorChooser+=1
arc(qs, -qs, hs, hs, HALF_PI, PI)
pop()
}