xxxxxxxxxx
27
let pbn = [0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,1,0,0,0]
function setup() {
createCanvas(400, 400);
s = 20
d = 30
cx = width/2
cy = height/2
chx = pbn.length / 7 / 2 * d
chy = (((pbn.length / 7) / 2) - 0.5) * d
stroke(255)
strokeWeight(s)
}
function draw() {
background(22);
for (p in pbn) {
let x = p%7 * d
let y = floor(p/7) * d
if (pbn[p] === 1) {
point(cx + x - chx, cy + y - chy)
}
}
}