Day7 of #Genuary2026 and today's prompt was something related to booleans. Programmed in #L5
(Hmm, on upload, i see the video gets upscaled! it should only be 100 pixels wide! that's why this looks so pixelated).
Also, on reflection, this doesn't look like generative art as such, but it was still fun to program and i'm ready for bed! :)
--genuary 2026 day 7
require("L5")
function setup()
windowTitle('Genuary day 7: Boolean play')
total = 0
val = {
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0},
}
size(110,200)
textAlign(CENTER, CENTER)
describe('a grid of values that can be toggled between 0 and 1 when clicked.')
end
function draw()
background(0)
textSize(80)
fill(255,0,0)
text(total,width/2,height-50)
fill(255)
textSize(10)
total = 0
for y = 1,#val do
for x = 1,#val[1] do
text(val[y][x], x* 10 , y * 10)
if val[y][x] == 1 then
total = total + 1
end
end
end
end
function mouseDragged()
local _x = floor(mouseX/10)
local _y = floor(mouseY/10)
local total = 0
if val[_y][_x] == 1 then
val[_y][_x] = 0
else
val[_y][_x] = 1
end
end