I think it’s a nice idea to create random artwork pixelations like that, but you have to invent some methods to evenly distributed the pattern like @philipplehmann mentioned.
The whole thing reminded me of a QR code, so I puzzled a little bit and the result are these lines of code, which give the embedded iframe below. What do you think the decoding of this bar will write?
t=u=g=0;r=[1,8,9,12,15,22,12,14,3,6,17,20,3,6,12,14,17,20,3,6,17,20,9,14,1,8,15,22,10,
12,1,3,5,8,18,22,1,4,14,17,19,21,7,12,17,19,8,11,13,15,16,18,4,11,14,16,17,19,20,22,
1,8,15,19,9,12,3,6,12,15,20,22,3,6,17,19,3,6,10,12,14,16,13,15,1,8,9,12,13,15,18,19,21,22];
q=[3,1,2,3,2,1,2,1,3,3,2,3,1,3,2,1,3,2,3,1,5,3,1,1,1,0,2,2,0,6,2,2,2,2,1,1,3,2,0,1,1,2];
c=[1,8,9,14,15,22,9,11,11,12,12,13,10,11,12,14,1,8,15,22,1,5,7,8,10,11,14,15,17,18,20,21,4,6,
15,16,1,4,6,9,10,11,14,15,7,10,12,14,16,17,1,8,9,10,17,18,20,22,16,17,19,20,19,20,12,18,1,8,18,19];
setup=_=>{createCanvas(w=460,w).background(255);strokeWeight(20).strokeCap(SQUARE)
for(y=20;y<440;y+=20){for(p=0;p<q[u];p++){line(r[t]*20,y,r[t+1]*20,y);t+=2;}u++;}
for(x=30;x<440;x+=20){for(p=0;p<q[u];p++){line(x,c[g]*20-10,x,c[g+1]*20-10);g+=2;}u++;}}
.