xxxxxxxxxx
let sizing= 15
let spacing=2
let colors=["#94472f","#0e5264","#522829","#20283a","#c97a5a"]
function preload(){
font= loadFont('FamiljenGrotesk-VariableFont_wght.ttf')
}
function setup() {
createCanvas(400, 400);
background('#f4f1de')
for(let x=60; x<180; x+=sizing*0.75){
for(let y=60; y<340; y+=sizing+spacing){
let colorChoice=random()
if(colorChoice<0.1){
stroke(random(colors))
strokeWeight(1.75)
}else{
stroke(0)
strokeWeight(0.75)
}
glyph(x, y, sizing)
}
}
for(let x=220; x<340; x+=sizing*0.75){
for(let y=60; y<340; y+=sizing+spacing){
let colorChoice=random()
if(colorChoice<0.1){
stroke(random(colors))
strokeWeight(1.75)
}else{
stroke(0)
strokeWeight(0.75)
}
glyph(x, y, sizing)
}
}
noFill()
textFont(font)
fill(100)
text('1.29', 20, 380)
}
function glyph(x, y, s) {
strokeCap(SQUARE)
noFill()
push()
translate(x, y)
VLines = floor(random(1, 3))
for (let i = 0; i < VLines; i++) {
xoff = random(-s / 8, s / 8)
line(xoff, -s / 2, xoff, s / 2)
}
HLines = floor(random(1, 5))
length = random(s / 6, s / 4)
for (let i = 0; i < HLines; i++) {
yoff = random(-s * 0.4, s * 0.4)
offset = random(-length / 8, length / 8)
line(-length / 2 + offset, yoff, length / 2 + offset, yoff)
}
swooshes = floor(random(0, 2))
if (swooshes == 1) {
let size = random(s / 6, s / 3)
noFill()
arc(xoff = random(-s / 8, s / 8), yoff = random(-s * 0.4, s * 0.4), size, size, random(0, PI), random(PI, TWO_PI))
}
pop()
}